public class DefaultSPAuthnContextMapper extends Object implements SPAuthnContextMapper
DefaultSPAuthnContextMapper.java
class determines
the authentication context and the authentication requirements for
authentication by the authenticaion authority.
This implementation only uses Authentication Class Reference.
The Authentication Class Reference can be passed as a query parameter
or set in the SP Entity Configuration.Constructor and Description |
---|
DefaultSPAuthnContextMapper() |
Modifier and Type | Method and Description |
---|---|
int |
getAuthLevel(RequestedAuthnContext reqCtx,
AuthnContext authnContext,
String realm,
String hostEntityID,
String idpEntityID)
Returns the auth level for the AuthContext
|
RequestedAuthnContext |
getRequestedAuthnContext(String realm,
String hostEntityID,
Map paramsMap)
Returns the
RequestedAuthnContext object. |
boolean |
isAuthnContextMatching(List requestedACClassRefs,
String acClassRef,
String comparison,
String realm,
String hostEntityID)
Returns true if the specified AuthnContextClassRef matches a list of
requested AuthnContextClassRef.
|
public RequestedAuthnContext getRequestedAuthnContext(String realm, String hostEntityID, Map paramsMap) throws SAML2Exception
RequestedAuthnContext
object.
The RequestedAuthContext is created based on the query parameters
AuthnContextClassRef and AuthComparison in the request
and authnContext attribute ,
spAuthncontextClassrefMapping, and authComparison
attribute, spAuthncontextComparisonType ,
set in the Service Provider Extended Configuration.
If the AuthnContext Class Reference cannot be determined then
the default value
urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTranstport
will be used. AuthnComparsion defaults to "exact" if no value
is specified.getRequestedAuthnContext
in interface SPAuthnContextMapper
realm
- Realm or Organization of the Service Provider.hostEntityID
- Entity ID of the Service Provider.paramsMap
- Map containing key/value pairs of parameters.
The key/value pairs are those accepted during SP SSO
initiation.SAML2Exception
- if an error occurs.public int getAuthLevel(RequestedAuthnContext reqCtx, AuthnContext authnContext, String realm, String hostEntityID, String idpEntityID) throws SAML2Exception
getAuthLevel
in interface SPAuthnContextMapper
reqCtx
- the RequestedAuthContext object.authnContext
- the AuthnContext object.realm
- the realm or organization to
retreive the authncontext.hostEntityID
- the Service Provider Identity String.idpEntityID
- the Identity Provider Identity String.SAML2Exception
- if there is an error.public boolean isAuthnContextMatching(List requestedACClassRefs, String acClassRef, String comparison, String realm, String hostEntityID)
isAuthnContextMatching
in interface SPAuthnContextMapper
requestedACClassRefs
- a list of requested AuthnContextClassRef'sacClassRef
- AuthnContextClassRefcomparison
- the type of comparisonrealm
- Realm or Organization of the Service Provider.hostEntityID
- Entity ID of the Service Provider.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.