public class SAML2Profile extends CommonProfile
This class is the user profile for sites using SAML2 protocol.
It is returned by the SAML2Client.
logger, SEPARATOR| Constructor and Description |
|---|
SAML2Profile() |
SAML2Profile(boolean canMergeAttributes)
Create a profile with possibility to merge attributes with the same name and collection-type values.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getAuthnContexts() |
java.lang.String |
getIssuerEntityID() |
org.joda.time.DateTime |
getNotBefore() |
org.joda.time.DateTime |
getNotOnOrAfter() |
java.lang.String |
getSamlNameIdFormat() |
java.lang.String |
getSamlNameIdNameQualifier() |
java.lang.String |
getSamlNameIdSpNameQualifier() |
java.lang.String |
getSamlNameIdSpProviderId() |
java.lang.String |
getSessionIndex() |
asPrincipal, getDisplayName, getEmail, getFamilyName, getFirstName, getGender, getLocale, getLocation, getPictureUrl, getProfileUrl, getUsername, isExpiredaddAttribute, addAttributes, addAuthenticationAttribute, addAuthenticationAttributes, addPermission, addPermissions, addRole, addRoles, addRoles, build, build, clearSensitiveData, containsAttribute, containsAuthenicationAttribute, getAttribute, getAttribute, getAttributes, getAuthenticationAttribute, getAuthenticationAttribute, getAuthenticationAttributes, getClientName, getId, getLinkedId, getPermissions, getRoles, getTypedId, isRemembered, readExternal, removeAttribute, removeAuthenticationAttribute, setClientName, setId, setLinkedId, setPermissions, setRemembered, setRoles, toString, writeExternalpublic SAML2Profile()
public SAML2Profile(boolean canMergeAttributes)
In order to use it you may initialize the client in the following way:
SAML2Client client = new SAML2Client(); SAML2ClientConfiguration config = new SAML2ClientConfiguration(); SAML2Authenticator authenticator = new SAML2Authenticator(config.getAttributeAsId()); boolean canMergeAttributes = true; authenticator.setProfileDefinition(new CommonProfileDefinition<>(x → new SAML2Profile(canMergeAttributes))); client.setAuthenticator(authenticator);
canMergeAttributes - if true - merge attributes with the same name and collection-type values, if false - overwrite them.public org.joda.time.DateTime getNotBefore()
public org.joda.time.DateTime getNotOnOrAfter()
public java.lang.String getSessionIndex()
public java.lang.String getIssuerEntityID()
public java.util.List<java.lang.String> getAuthnContexts()
public java.lang.String getSamlNameIdFormat()
public java.lang.String getSamlNameIdNameQualifier()
public java.lang.String getSamlNameIdSpNameQualifier()
public java.lang.String getSamlNameIdSpProviderId()
Copyright © 2019. All Rights Reserved.