public class DefaultLibrarySPAccountMapper extends DefaultAccountMapper implements SPAccountMapper
DefaultLibrarySPAccountMapper
is the default implementation of the
SPAccountMapper
that is used to map the SAML
protocol objects to the user accounts at the
ServiceProvider
side of SAML v2 plugin.
Custom implementations may extend from this class to override some of these implementations if they choose to do so.bundle, debug, dsProvider, IDP, keyProvider, metaManager, role, SP
Constructor and Description |
---|
DefaultLibrarySPAccountMapper()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
protected String |
getAutoFedUser(String realm,
String entityID,
Assertion assertion,
String decryptedNameID,
Set<PrivateKey> decryptionKeys)
Returns user for the auto federate attribute.
|
String |
getIdentity(Assertion assertion,
String hostEntityID,
String realm)
Returns the user's distinguished name or the universal ID for the corresponding
SAML Assertion . |
protected String |
getTransientUser(String realm,
String entityID)
Returns the transient user configured in the hosted entity configuration.
|
protected boolean |
isDynamicalOrIgnoredProfile(String realm)
Checks if dynamical profile creation or ignore profile is enabled.
|
boolean |
shouldPersistNameIDFormat(String realm,
String hostEntityID,
String remoteEntityID,
String nameIDFormat)
Tells whether the provided NameID-Format should be persisted in the user data store or not.
|
getAttribute, getIdentity, getSSOConfig
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIdentity
public DefaultLibrarySPAccountMapper()
public String getIdentity(Assertion assertion, String hostEntityID, String realm) throws SAML2Exception
SAML Assertion
. This
method will be invoked by the SAML
framework while processing the Assertion
and
retrieves the identity information.
The implementation of this method first checks if the NameID-Format is transient and returns the transient user.
Otherwise it checks for the user for the corresponding name identifier in the assertion.
If not found, then it will check if this is an auto federation case.getIdentity
in interface SPAccountMapper
assertion
- SAML Assertion
that needs to be mapped to the user.hostEntityID
- EntityID
of the hosted provider.realm
- Realm or the organization name that may be used to find the user information.SAML2Exception
- If there was any failure.public boolean shouldPersistNameIDFormat(String realm, String hostEntityID, String remoteEntityID, String nameIDFormat)
SPAccountMapper
shouldPersistNameIDFormat
in interface SPAccountMapper
realm
- The hosted SP's realm.hostEntityID
- The hosted SP's entityID.remoteEntityID
- The remote IdP's entityID.nameIDFormat
- The non-transient NameID-Format in question.true
if the provided NameID-Format should be persisted in the user data store,
false
otherwise.protected String getTransientUser(String realm, String entityID)
realm
- Realm name for the given entity.entityID
- Hosted EntityID
.protected String getAutoFedUser(String realm, String entityID, Assertion assertion, String decryptedNameID, Set<PrivateKey> decryptionKeys) throws SAML2Exception
realm
- Realm name.entityID
- Hosted EntityID
.assertion
- Assertion
from the identity provider.AttributeStatement
. if the
statement does not have the auto federation attribute then the NameID value will be used if use NameID as SP user
ID is enabled, otherwise null.SAML2Exception
protected boolean isDynamicalOrIgnoredProfile(String realm)
realm
- Realm to check the dynamical profile creation attributes.true
if dynamical profile creation or ignore profile is enabled, false
otherwise.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.