Skip to content

Commit

Permalink
Merge pull request #168 from DMHP/new
Browse files Browse the repository at this point in the history
Set NameId options
  • Loading branch information
DMHP authored Jan 10, 2024
2 parents 3b45665 + 0ece634 commit 429cb44
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ public class SAMLSSOAuthenticator extends AbstractApplicationAuthenticator
private static final String AUTH_PARAM = "$authparam";
private static final String DYNAMIC_AUTH_PARAMS_LOOKUP_REGEX = "\\$authparam\\{(\\w+)}";
private static final Pattern authParamDynamicQueryPattern = Pattern.compile(DYNAMIC_AUTH_PARAMS_LOOKUP_REGEX);
private String[] samlNameIdFormats = {
"urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified",
"urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
"urn:oasis:names:tc:SAML:2.0:nameid-format:entity",
"urn:oasis:names:tc:SAML:2.0:nameid-format:encrypted",
"urn:oasis:names:tc:SAML:2.0:nameid-format:transient",
"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
};

private static final Log log = LogFactory.getLog(SAMLSSOAuthenticator.class);

Expand Down Expand Up @@ -573,6 +581,7 @@ public List<Property> getConfigurationProperties() {
nameIdFormat.setDescription("NameID format to be used in the SAML request");
nameIdFormat.setType("string");
nameIdFormat.setDisplayOrder(2);
nameIdFormat.setOptions(samlNameIdFormats);
nameIdFormat.setDefaultValue(IdentityApplicationConstants.Authenticator.SAML2SSO.UNSPECIFIED_NAME_ID_FORMAT);
configProperties.add(nameIdFormat);

Expand Down

0 comments on commit 429cb44

Please sign in to comment.