Class SAMLPeerEntityContext
java.lang.Object
org.opensaml.messaging.context.BaseContext
org.opensaml.saml.common.messaging.context.AbstractSAMLEntityContext
org.opensaml.saml.common.messaging.context.AbstractAuthenticatableSAMLEntityContext
org.opensaml.saml.common.messaging.context.SAMLPeerEntityContext
- All Implemented Interfaces:
Iterable<BaseContext>
Subcontext that carries information about a SAML peer entity.
This context will often contain subcontexts, whose data is construed to be scoped to that peer entity.
The method getEntityId()
will attempt to dynamically resolve the appropriate data
from the SAML message held in the message context if the data has not been set statically
by the corresponding setter method. This evaluation will be attempted only if the this
context instance is an immediate child of the message context, as returned by BaseContext.getParent()
.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext
BaseContext.ContextSetNoRemoveIteratorDecorator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.slf4j.Logger
Logger.private boolean
Whether to use the resource of SAML 1 queries to resolve the entity ID. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the entityId of the SAML entity.boolean
Gets whether to use the Resource attribute of some SAML 1 queries to resolve the entity ID.protected String
Resolve the SAML entity ID from a SAML 1 AttributeQuery.protected String
Resolve the SAML entityID from a SAML 1 AuthorizationDecisionQuery.protected String
processSaml1Request
(Request request) Resolve the SAML entity ID from a SAML 1 request.protected String
processSaml1Response
(Response response) Resolve the SAML entity ID from a SAML 1 response.protected String
processSaml2Issuer
(Issuer issuer) Resolve the SAML entity ID from a SAML 2 Issuer.protected String
processSaml2Request
(RequestAbstractType request) Resolve the SAML entity ID from a SAML 2 request.protected String
processSaml2Response
(StatusResponseType statusResponse) Resolve the SAML entity ID from a SAML 2 response.protected String
processSaml2ResponseAssertions
(Response response) Resolve the SAML entity ID from the Assertions of a SAML 2 response.protected String
Dynamically resolve the SAML peer entity ID from the SAML protocol message held inMessageContext.getMessage()
.protected SAMLObject
Resolve the SAML message from the message context.void
setUseSAML1QueryResourceAsEntityId
(boolean useResource) Sets whether to use the Resource attribute of some SAML 1 queries to resolve the entity ID.Methods inherited from class org.opensaml.saml.common.messaging.context.AbstractAuthenticatableSAMLEntityContext
isAuthenticated, setAuthenticated
Methods inherited from class org.opensaml.saml.common.messaging.context.AbstractSAMLEntityContext
getRole, setEntityId, setRole
Methods inherited from class org.opensaml.messaging.context.BaseContext
addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, iterator, removeSubcontext, removeSubcontext, setParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
log
@Nonnull private org.slf4j.Logger logLogger. -
useSAML1QueryResourceAsEntityId
private boolean useSAML1QueryResourceAsEntityIdWhether to use the resource of SAML 1 queries to resolve the entity ID.
-
-
Constructor Details
-
SAMLPeerEntityContext
public SAMLPeerEntityContext()Constructor.
-
-
Method Details
-
getEntityId
Gets the entityId of the SAML entity.- Overrides:
getEntityId
in classAbstractSAMLEntityContext
- Returns:
- entityId of the SAML entity, may be null
-
getUseSAML1QueryResourceAsEntityId
public boolean getUseSAML1QueryResourceAsEntityId()Gets whether to use the Resource attribute of some SAML 1 queries to resolve the entity ID.- Returns:
- whether to use the Resource attribute of some SAML 1 queries to resolve the entity ID
-
setUseSAML1QueryResourceAsEntityId
public void setUseSAML1QueryResourceAsEntityId(boolean useResource) Sets whether to use the Resource attribute of some SAML 1 queries to resolve the entity ID.- Parameters:
useResource
- whether to use the Resource attribute of some SAML 1 queries to resolve the entity ID
-
resolveEntityId
Dynamically resolve the SAML peer entity ID from the SAML protocol message held inMessageContext.getMessage()
.- Returns:
- the entity ID, or null if it could not be resolved
-
processSaml2Request
Resolve the SAML entity ID from a SAML 2 request.- Parameters:
request
- the request- Returns:
- the entity ID, or null if it could not be resolved
-
processSaml2Response
Resolve the SAML entity ID from a SAML 2 response.- Parameters:
statusResponse
- the response- Returns:
- the entity ID, or null if it could not be resolved
-
processSaml2ResponseAssertions
Resolve the SAML entity ID from the Assertions of a SAML 2 response.- Parameters:
response
- the response- Returns:
- the entity ID, or null if it could not be resolved
-
processSaml2Issuer
Resolve the SAML entity ID from a SAML 2 Issuer.- Parameters:
issuer
- the issuer- Returns:
- the entity ID, or null if it could not be resolved
-
processSaml1Response
Resolve the SAML entity ID from a SAML 1 response.- Parameters:
response
- the response- Returns:
- the entity ID, or null if it could not be resolved
-
processSaml1Request
Resolve the SAML entity ID from a SAML 1 request.- Parameters:
request
- the request- Returns:
- the entity ID, or null if it could not be resolved
-
processSaml1AttributeQuery
Resolve the SAML entity ID from a SAML 1 AttributeQuery.- Parameters:
query
- the query- Returns:
- the entity ID, or null if it could not be resolved
-
processSaml1AuthorizationDecisionQuery
@Nullable protected String processSaml1AuthorizationDecisionQuery(@Nonnull AuthorizationDecisionQuery query) Resolve the SAML entityID from a SAML 1 AuthorizationDecisionQuery.- Parameters:
query
- the query- Returns:
- the entity ID, or null if it could not be resolved
-
resolveSAMLMessage
Resolve the SAML message from the message context.- Returns:
- the SAML message, or null if it can not be resolved
-