Class PersistentNameIDGenerator
java.lang.Object
se.swedenconnect.spring.saml.idp.attributes.nameid.AbstractNameIDGenerator
se.swedenconnect.spring.saml.idp.attributes.nameid.PersistentNameIDGenerator
- All Implemented Interfaces:
Serializable,NameIDGenerator
A
NameIDGenerator for generaring persistent NameIDs.- Author:
- Martin Lindström
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPersistentNameIDGenerator(String nameQualifier) Constructor.PersistentNameIDGenerator(String nameQualifier, String spNameQualifier) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringReturnsurn:oasis:names:tc:SAML:2.0:nameid-format:persistent.protected StringgetIdentifier(Saml2UserAuthentication authentication) Gets theNameIDidentifier to use.voidsetHashAlgorithm(String hashAlgorithm) Assigns the JCE name for the hash algorithm to use.Methods inherited from class se.swedenconnect.spring.saml.idp.attributes.nameid.AbstractNameIDGenerator
getNameID, getNameQualifier, getSpNameQualifier
-
Constructor Details
-
PersistentNameIDGenerator
Constructor.- Parameters:
nameQualifier- the name qualifier, usually the IdP entityID
-
PersistentNameIDGenerator
Constructor.- Parameters:
nameQualifier- the name qualifier, usually the IdP entityIDspNameQualifier- the SP name qualifier
-
-
Method Details
-
getIdentifier
Gets theNameIDidentifier to use.- Specified by:
getIdentifierin classAbstractNameIDGenerator- Parameters:
authentication- the user authentication object- Returns:
- an identifier string (never
null)
-
getFormat
Returnsurn:oasis:names:tc:SAML:2.0:nameid-format:persistent.- Specified by:
getFormatin classAbstractNameIDGenerator- Returns:
- the format URI
-
setHashAlgorithm
Assigns the JCE name for the hash algorithm to use. The default isSHA-256.- Parameters:
hashAlgorithm- the JCE name for the hash algorithm
-