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 NameID
s.- Author:
- Martin Lindström
- See Also:
-
Constructor Summary
ConstructorDescriptionPersistentNameIDGenerator
(String nameQualifier) Constructor.PersistentNameIDGenerator
(String nameQualifier, String spNameQualifier) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Returnsurn:oasis:names:tc:SAML:2.0:nameid-format:persistent
.protected String
getIdentifier
(Saml2UserAuthentication authentication) Gets theNameID
identifier to use.void
setHashAlgorithm
(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 theNameID
identifier to use.- Specified by:
getIdentifier
in 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:
getFormat
in 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
-