Class AbstractNameIDGenerator
java.lang.Object
se.swedenconnect.spring.saml.idp.attributes.nameid.AbstractNameIDGenerator
- All Implemented Interfaces:
Serializable
,NameIDGenerator
- Direct Known Subclasses:
PersistentNameIDGenerator
,TransientNameIDGenerator
Abstract base class for the
NameIDGenerator
interface.- Author:
- Martin Lindström
- See Also:
-
Constructor Summary
ConstructorDescriptionAbstractNameIDGenerator
(String nameQualifier) Constructor.AbstractNameIDGenerator
(String nameQualifier, String spNameQualifier) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
Gets theFormat
for thisNameID
.protected abstract String
getIdentifier
(Saml2UserAuthentication authentication) Gets theNameID
identifier to use.org.opensaml.saml.saml2.core.NameID
getNameID
(Saml2UserAuthentication authentication) Generate aNameID
based on the supplied authentication object.protected String
Gets the name qualifier, usually the IdP entityID.protected String
Gets SP name qualifier.
-
Constructor Details
-
AbstractNameIDGenerator
Constructor.- Parameters:
nameQualifier
- the name qualifier, usually the IdP entityID
-
AbstractNameIDGenerator
Constructor.- Parameters:
nameQualifier
- the name qualifier, usually the IdP entityIDspNameQualifier
- the SP name qualifier
-
-
Method Details
-
getNameID
Generate aNameID
based on the supplied authentication object.- Specified by:
getNameID
in interfaceNameIDGenerator
- Parameters:
authentication
- the authentication object- Returns:
- a
NameID
-
getIdentifier
Gets theNameID
identifier to use.- Parameters:
authentication
- the user authentication object- Returns:
- an identifier string (never
null
)
-
getFormat
Gets theFormat
for thisNameID
.- Returns:
- the format URI
-
getNameQualifier
Gets the name qualifier, usually the IdP entityID.- Returns:
- the name qualifier
-
getSpNameQualifier
Gets SP name qualifier.- Returns:
- the SP name qualifier
-