Class SAMLAuthnContext
- java.lang.Object
-
- org.opensaml.messaging.context.BaseContext
-
- net.shibboleth.idp.saml.saml2.profile.impl.SAMLAuthnContext
-
- All Implemented Interfaces:
Iterable<BaseContext>
public class SAMLAuthnContext extends BaseContext
Manages state during proxied SAML authentication.- Since:
- 4.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext
BaseContext.ContextSetNoRemoveIteratorDecorator
-
-
Field Summary
Fields Modifier and Type Field Description private AuthnStatementauthnStatementAuthentication statement.private Function<String,MessageDecoder>decoderFactoryThe function to use to obtain a decoder.private ProfileActionencodeMessageActionProfile action to execute to produce outbound message response.private MessageHandleroutboundMessageHandlerOutbound message handler to run prior to encoding.private SubjectsubjectSubject of assertion used to authenticate.
-
Constructor Summary
Constructors Constructor Description SAMLAuthnContext(ProfileAction action, Function<String,MessageDecoder> factory)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthnStatementgetAuthnStatement()Get the SAMLAuthnStatementfrom the authentication.ProfileActiongetEncodeMessageAction()Get the message-encoding profile action.Function<String,MessageDecoder>getMessageDecoderFactory()Get the factory function to obtain message decoders.MessageHandlergetOutboundMessageHandler()Get the outboundMessageHandlerto run prior to encoding.SubjectgetSubject()Get the SAMLSubjectfrom the authentication.SAMLAuthnContextsetAuthnStatement(AuthnStatement statement)Set the SAMLAuthnStatementfrom the authentication.SAMLAuthnContextsetOutboundMessageHandler(MessageHandler handler)Set the outboundMessageHandlerto run prior to encoding.SAMLAuthnContextsetSubject(Subject sub)Set the SAMLSubjectfrom the authentication.-
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 Detail
-
outboundMessageHandler
@Nullable private MessageHandler outboundMessageHandler
Outbound message handler to run prior to encoding.
-
encodeMessageAction
@Nonnull private ProfileAction encodeMessageAction
Profile action to execute to produce outbound message response.
-
decoderFactory
@Nonnull private Function<String,MessageDecoder> decoderFactory
The function to use to obtain a decoder.
-
subject
@Nullable private Subject subject
Subject of assertion used to authenticate.
-
authnStatement
@Nullable private AuthnStatement authnStatement
Authentication statement.
-
-
Constructor Detail
-
SAMLAuthnContext
public SAMLAuthnContext(@Nonnull ProfileAction action, @Nonnull Function<String,MessageDecoder> factory)Constructor.- Parameters:
action- message-encoding profile actionfactory- factory function to obtain decoders
-
-
Method Detail
-
getEncodeMessageAction
@Nonnull public ProfileAction getEncodeMessageAction()
Get the message-encoding profile action.- Returns:
- profile action
-
getMessageDecoderFactory
@Nonnull public Function<String,MessageDecoder> getMessageDecoderFactory()
Get the factory function to obtain message decoders.- Returns:
- factory function
-
getOutboundMessageHandler
@Nullable public MessageHandler getOutboundMessageHandler()
Get the outboundMessageHandlerto run prior to encoding.- Returns:
- the outbound
MessageHandler
-
setOutboundMessageHandler
@Nonnull public SAMLAuthnContext setOutboundMessageHandler(@Nullable MessageHandler handler)
Set the outboundMessageHandlerto run prior to encoding.- Parameters:
handler- outboundMessageHandlerto set- Returns:
- this context
-
getSubject
@Nullable public Subject getSubject()
Get the SAMLSubjectfrom the authentication.- Returns:
- SAML
Subject
-
setSubject
@Nonnull public SAMLAuthnContext setSubject(@Nullable Subject sub)
Set the SAMLSubjectfrom the authentication.- Parameters:
sub- the SAMLSubject- Returns:
- this context
-
getAuthnStatement
@Nullable public AuthnStatement getAuthnStatement()
Get the SAMLAuthnStatementfrom the authentication.- Returns:
- SAML
AuthnStatement
-
setAuthnStatement
@Nonnull public SAMLAuthnContext setAuthnStatement(@Nullable AuthnStatement statement)
Set the SAMLAuthnStatementfrom the authentication.- Parameters:
statement- the SAMLAuthnStatement- Returns:
- this context
-
-