public class SAMLSubjectNameIdentifierContext extends BaseContext
NameIdentifier or a SAML 2 NameID.
The methods getSubjectNameIdentifier(), getSAML1SubjectNameIdentifier() and
getSAML2SubjectNameID() will attempt to dynamically resolve the appropriate data from
the SAML message held in the parent message context if the data has not been set statically by
the corresponding setter method. This evaluation will be attempted only if:
MessageContext as returned by BaseContext.getParent()
SAMLObjectSubjectQuery,
SubjectQuery or AuthnRequest.
BaseContext.ContextSetNoRemoveIteratorDecorator| Modifier and Type | Field and Description |
|---|---|
private org.slf4j.Logger |
log
Logger.
|
private SAMLObject |
nameID
The SAML name identifier represented by this context.
|
| Constructor and Description |
|---|
SAMLSubjectNameIdentifierContext() |
| Modifier and Type | Method and Description |
|---|---|
NameIdentifier |
getSAML1SubjectNameIdentifier()
Gets the SAML 1
NameIdentifier represented by this context. |
NameID |
getSAML2SubjectNameID()
Gets the SAML 2
NameID represented by this context. |
SAMLObject |
getSubjectNameIdentifier()
Gets the subject name identifier represented by the context, which is guaranteed to be either
a SAML 1
NameIdentifier or a SAML 2 NameID. |
protected SAMLObject |
resolveNameIdentifier()
Dynamically resolve the name identifier from the SAML protocol message held in
MessageContext.getMessage(), if it exists. |
protected SAMLObject |
resolveSAMLMessage()
Resolve the SAML message from the message context.
|
void |
setSubjectNameIdentifier(SAMLObject newNameID)
Sets the name identifier, which must be either a SAML 1
NameIdentifier
or a SAML 2 NameID or null. |
addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, isAutoCreateSubcontexts, iterator, removeSubcontext, removeSubcontext, setAutoCreateSubcontexts, setParentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliterator@Nullable private org.slf4j.Logger log
@Nullable private SAMLObject nameID
@Nullable public SAMLObject getSubjectNameIdentifier()
NameIdentifier or a SAML 2 NameID.
The value will be dynamically resolved if the immediate parent context of this context is
a MessageContext holding a SAMLObject representing a SAML protocol message,
and that protocol message contains a SAML 1 or SAML 2 subject.
@Nullable public NameIdentifier getSAML1SubjectNameIdentifier()
NameIdentifier represented by this context.
Dynamic resolution is attempted per getSubjectNameIdentifier().
@Nullable public NameID getSAML2SubjectNameID()
NameID represented by this context.
Dynamic resolution is attempted per getSubjectNameIdentifier().
public void setSubjectNameIdentifier(@Nullable SAMLObject newNameID)
NameIdentifier
or a SAML 2 NameID or null.newNameID - the name identifier instance@Nullable protected SAMLObject resolveNameIdentifier()
MessageContext.getMessage(), if it exists.@Nullable protected SAMLObject resolveSAMLMessage()
Copyright © 1999–2018 Shibboleth Consortium. All rights reserved.