KEYCLOAK-9578 Fix typo in SAML attribute name format
This commit is contained in:
parent
1c906c834b
commit
25c07f78bc
2 changed files with 3 additions and 2 deletions
|
@ -38,6 +38,7 @@ public enum JBossSAMLURIConstants {
|
||||||
ASSERTION_NSURI("urn:oasis:names:tc:SAML:2.0:assertion"),
|
ASSERTION_NSURI("urn:oasis:names:tc:SAML:2.0:assertion"),
|
||||||
ATTRIBUTE_FORMAT_BASIC("urn:oasis:names:tc:SAML:2.0:attrname-format:basic"),
|
ATTRIBUTE_FORMAT_BASIC("urn:oasis:names:tc:SAML:2.0:attrname-format:basic"),
|
||||||
ATTRIBUTE_FORMAT_URI("urn:oasis:names:tc:SAML:2.0:attrname-format:uri"),
|
ATTRIBUTE_FORMAT_URI("urn:oasis:names:tc:SAML:2.0:attrname-format:uri"),
|
||||||
|
ATTRIBUTE_FORMAT_UNSPECIFIED("urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"),
|
||||||
|
|
||||||
CLAIMS_EMAIL_ADDRESS_2005("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"),
|
CLAIMS_EMAIL_ADDRESS_2005("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"),
|
||||||
CLAIMS_EMAIL_ADDRESS("http://schemas.xmlsoap.org/claims/EmailAddress"),
|
CLAIMS_EMAIL_ADDRESS("http://schemas.xmlsoap.org/claims/EmailAddress"),
|
||||||
|
|
|
@ -67,8 +67,8 @@ public class AttributeStatementHelper {
|
||||||
AttributeType attribute = new AttributeType(attributeName);
|
AttributeType attribute = new AttributeType(attributeName);
|
||||||
String attributeType = mappingModel.getConfig().get(SAML_ATTRIBUTE_NAMEFORMAT);
|
String attributeType = mappingModel.getConfig().get(SAML_ATTRIBUTE_NAMEFORMAT);
|
||||||
String attributeNameFormat = JBossSAMLURIConstants.ATTRIBUTE_FORMAT_BASIC.get();
|
String attributeNameFormat = JBossSAMLURIConstants.ATTRIBUTE_FORMAT_BASIC.get();
|
||||||
if ("URI Reference".equals(attributeType)) attributeNameFormat = JBossSAMLURIConstants.ATTRIBUTE_FORMAT_URI.get();
|
if (URI_REFERENCE.equals(attributeType)) attributeNameFormat = JBossSAMLURIConstants.ATTRIBUTE_FORMAT_URI.get();
|
||||||
else if ("Unspecified".equals(attributeType)) attributeNameFormat = "urn:oasis:names:tc:SAML2.0:attrname-format:unspecified";
|
else if (UNSPECIFIED.equals(attributeType)) attributeNameFormat = JBossSAMLURIConstants.ATTRIBUTE_FORMAT_UNSPECIFIED.get();
|
||||||
attribute.setNameFormat(attributeNameFormat);
|
attribute.setNameFormat(attributeNameFormat);
|
||||||
String friendlyName = mappingModel.getConfig().get(FRIENDLY_NAME);
|
String friendlyName = mappingModel.getConfig().get(FRIENDLY_NAME);
|
||||||
if (friendlyName != null && !friendlyName.trim().equals("")) attribute.setFriendlyName(friendlyName);
|
if (friendlyName != null && !friendlyName.trim().equals("")) attribute.setFriendlyName(friendlyName);
|
||||||
|
|
Loading…
Reference in a new issue