Skip to content

Commit

Permalink
Merge pull request #2240 from GluuFederation/issue_2211
Browse files Browse the repository at this point in the history
fix: added the removed attributes #2211
  • Loading branch information
yurem authored Aug 29, 2022
2 parents bd3abcc + acc582a commit e7462eb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ public class UpdateClientAction implements Serializable {

private String searchAvailableClaimPattern;
private String oldSearchAvailableClaimPattern;
private String defaultPromptLogin;
private String tlsSubjectDn;

private String availableLoginUri = HTTPS;
Expand All @@ -188,14 +187,11 @@ public class UpdateClientAction implements Serializable {
private String availableAdditionalAudience = "";
private String oxAttributesJson;
private String backchannelLogoutUri;
private String redirectRegex;
private String customScriptsforPostAuthn;
private String customScriptsforConsentGather;
private String spontaneousScopeCustomScript;
private String introspectionCustomScript;
private String rptClaimsScript;
private String updateTokenScript;
private String umaRPTModificationScript;


Pattern domainPattern = Pattern.compile("^((?!-)[A-Za-z0-9-]{1,63}(?<!-)\\\\.)+[A-Za-z]{2,6}");
Expand Down Expand Up @@ -255,8 +251,6 @@ public String add() throws Exception {
this.consentScripts = Lists.newArrayList();
this.spontaneousScopesScripts = Lists.newArrayList();
this.backchannelLogoutUri = getStringFromList(client.getAttributes().getBackchannelLogoutUri());
this.redirectRegex = client.getAttributes().getRedirectRegex();
this.defaultPromptLogin = client.getAttributes().getDefaultPromptLogin();
this.tlsSubjectDn = client.getAttributes().getTlsClientAuthSubjectDn();
searchAvailableCustomScriptsforAcr();
} catch (BasePersistenceException ex) {
Expand Down Expand Up @@ -317,8 +311,6 @@ public String update() throws Exception {
this.authorizedOrigins = getNonEmptyStringList(client.getAuthorizedOrigins());
this.claimRedirectURIList = getNonEmptyStringList(client.getClaimRedirectURI());
this.additionalAudienceList = getNonEmptyStringList(client.getAttributes().getAdditionalAudience());
this.redirectRegex = client.getAttributes().getRedirectRegex();
this.defaultPromptLogin = client.getAttributes().getDefaultPromptLogin();
this.tlsSubjectDn = client.getAttributes().getTlsClientAuthSubjectDn();

this.postAuthnScripts = searchAvailablePostAuthnCustomScripts().stream()
Expand All @@ -344,8 +336,6 @@ public String update() throws Exception {
this.spontaneousScopeCustomScript = getStringFromList(client.getAttributes().getSpontaneousScopeScriptDns());
this.introspectionCustomScript = getStringFromList(client.getAttributes().getIntrospectionScripts());
this.rptClaimsScript = getStringFromList(client.getAttributes().getRptClaimsScripts());
this.updateTokenScript = getStringFromList(client.getAttributes().getUpdateTokenScripts());
this.umaRPTModificationScript = getStringFromList(client.getAttributes().getUmaRPTModificationScripts());
this.resources = resourceSetService.findResourcesByClients(client.getDn());

searchAvailableCustomScriptsforAcr();
Expand Down Expand Up @@ -426,8 +416,6 @@ public String save() throws Exception {
updateAdditionalAudience();
updateBackchannelLogoutUri();
trimUriProperties();
client.getAttributes().setRedirectRegex(redirectRegex);
client.getAttributes().setDefaultPromptLogin(defaultPromptLogin);
client.getAttributes().setTlsClientAuthSubjectDn(tlsSubjectDn);
this.client.setEncodedClientSecret(encryptionService.encrypt(this.client.getOxAuthClientSecret()));
if (update) {
Expand Down Expand Up @@ -1091,15 +1079,7 @@ private void updateCustomScripts() {
&& !spontaneousScopeCustomScript.isEmpty()) {
this.client.getAttributes().getSpontaneousScopeScriptDns().add(spontaneousScopeCustomScript);
}
if(!this.client.getAttributes().getUpdateTokenScripts().contains(updateTokenScript)
&& !updateTokenScript.isEmpty()) {
this.client.getAttributes().getUpdateTokenScripts().add(updateTokenScript);
}

if(!this.client.getAttributes().getUmaRPTModificationScripts().contains(umaRPTModificationScript)
&& !umaRPTModificationScript.isEmpty()) {
this.client.getAttributes().getUmaRPTModificationScripts().add(umaRPTModificationScript);
}
}

public void selectAddedClaims() {
Expand Down Expand Up @@ -2028,27 +2008,11 @@ public void setBackchannelLogoutUri(String backchannelLogoutUri) {
this.backchannelLogoutUri = backchannelLogoutUri;
}

public String getRedirectRegex() {
return redirectRegex;
}

public void setRedirectRegex(String redirectRegex) {
this.redirectRegex = redirectRegex;
}

@ObjectClass(value = "gluuAttribute")
class AttributeDisplayNameEntry extends DisplayNameEntry {
public AttributeDisplayNameEntry() {}
}

public String getDefaultPromptLogin() {
return defaultPromptLogin;
}

public void setDefaultPromptLogin(String defaultPromptLogin) {
this.defaultPromptLogin = defaultPromptLogin;
}

public String getTlsSubjectDn() {
return tlsSubjectDn;
}
Expand Down Expand Up @@ -2105,27 +2069,11 @@ public void setRptClaimsScript(String rptClaimsScript) {
this.rptClaimsScript = rptClaimsScript;
}

public String getUpdateTokenScript() {
return updateTokenScript;
}

public void setUpdateTokenScript(String updateTokenScript) {
this.updateTokenScript = updateTokenScript;
}

public List<UmaResource> getResources() {
return resources;
}

public void setResources(List<UmaResource> resources) {
this.resources = resources;
}

public String getUmaRPTModificationScript() {
return umaRPTModificationScript;
}

public void setUmaRPTModificationScript(String umaRPTModificationScript) {
this.umaRPTModificationScript = umaRPTModificationScript;
}
}
45 changes: 0 additions & 45 deletions server/src/main/webapp/WEB-INF/incl/client/clientForm.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,6 @@
styleClass="col-sm-12 form-control rounded clientDescriptionTextArea"
cols="80" maxlength="250" id="descriptionId" />
</ox:decorate>
<ox:decorate id="redirectRegex"
label="#{msgs['clientForm.redirectRegex']}"
leftClass="col-sm-3" rightClass="col-sm-9">
<h:inputText value="#{_clientAction.redirectRegex}"
styleClass="form-control redirectRegexTextBox"
requiredMessage="Please Enter the redirect Regex"
required="false" id="redirectRegexId" />
</ox:decorate>
<ox:decorate id="sectorIdentifierUri" label="Sector URI"
leftClass="col-sm-3" rightClass="col-sm-9">
<h:inputText id="sectorIdentifierUriId"
Expand Down Expand Up @@ -631,12 +623,6 @@
/>
</h:selectOneMenu>
</ox:decorate>
<ox:decorate id="defaultPromptLogin" label="#{msgs['clientForm.defaultPromptLogin']}"
leftClass="col-sm-3" rightClass="col-sm-9">
<h:inputText id="defaultPromptLoginId"
value="#{_clientAction.defaultPromptLogin}" style="width:100%"
styleClass="form-control defaultPromptLoginId" />
</ox:decorate>

<ox:decorate id="tlsSubjectDn" label="#{msgs['clientForm.tlsSubjectDn']}"
leftClass="col-sm-3" rightClass="col-sm-9">
Expand Down Expand Up @@ -885,21 +871,6 @@
id="rptAsJwtId" styleClass="col-sm-9 rounded"
required="false" />
</ox:decorate>
<ox:decorate id="umaRPTModificationScript" label="#{msgs['clientForm.rptModificationScript']}"
leftClass="col-sm-3" rightClass="col-sm-9">

<h:selectOneMenu styleClass="col-sm-9 form-control rounded"
value="#{_clientAction.umaRPTModificationScript}"
id="umaRPTModificationScriptId" required="false">
<f:selectItem noSelectionOption="true" itemLabel="" />
<f:selectItems
value="#{_clientAction.searchAvailableCustomScriptsforRptModifications()}"
var="script"
itemLabel="#{script.name}"
itemValue="#{script.dn}"
/>
</h:selectOneMenu>
</ox:decorate>

<ox:decorate id="rptClaimsScripts" label="#{msgs['clientForm.rptClaimsScripts']}"
leftClass="col-sm-3" rightClass="col-sm-9">
Expand Down Expand Up @@ -1304,22 +1275,6 @@
/>
</h:selectOneMenu>
</ox:decorate>

<ox:decorate id="updateTokenScripts" label="#{msgs['clientForm.updateTokenScripts']}"
leftClass="col-sm-3" rightClass="col-sm-9">

<h:selectOneMenu styleClass="col-sm-9 form-control rounded"
value="#{_clientAction.updateTokenScript}"
id="rptClaimsScriptsId" required="false">
<f:selectItem noSelectionOption="true" itemLabel="" />
<f:selectItems
value="#{_clientAction.searchAvailableCustomScriptsforUpdateTokens()}"
var="script"
itemLabel="#{script.name}"
itemValue="#{script.dn}"
/>
</h:selectOneMenu>
</ox:decorate>
</div>
</div>
</div>
Expand Down

0 comments on commit e7462eb

Please sign in to comment.