Package net.shibboleth.idp.authn.context
Class ExternalAuthenticationContext
java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.authn.context.ExternalAuthenticationContext
- All Implemented Interfaces:
Iterable<BaseContext>
public final class ExternalAuthenticationContext extends BaseContext
A context representing the state of an externalized authentication attempt,
a case where authentication happens outside of a web flow.
- Parent:
AuthenticationContext
- Added:
- Before dispatching control to an external login flow
-
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 Collection<String>
authenticatingAuthorities
Proxied authenticating sources.private String
authnError
Error message.private Exception
authnException
Exception.private Instant
authnInstant
Time of authentication.private boolean
doNotCache
Flag preventing caching of result for SSO.private ExternalAuthentication
externalAuthentication
Implementation object.private String
flowExecutionUrl
Value of flowExecutionUrl on branching from flow.private boolean
previousResult
Flag indicating this "new" result is really "old".private Principal
principal
APrincipal
that was authenticated.private String
principalName
Name of a principal that was authenticated.private Subject
subject
Name of aSubject
that was authenticated. -
Constructor Summary
Constructors Constructor Description ExternalAuthenticationContext(ExternalAuthentication authentication)
Constructor. -
Method Summary
Modifier and Type Method Description boolean
doNotCache()
Get the "do not cache" flag.Collection<String>
getAuthenticatingAuthorities()
Get a mutable, ordered list of proxied authentication sources.String
getAuthnError()
Get an error message from the authentication process.Exception
getAuthnException()
Get an exception from the authentication process.Instant
getAuthnInstant()
Get the time of authentication.ExternalAuthentication
getExternalAuthentication()
Get theExternalAuthentication
object installed in the context.String
getFlowExecutionUrl()
Get the flow execution URL to return control to.Principal
getPrincipal()
Get aPrincipal
that was authenticated.String
getPrincipalName()
Get the name of a principal that was authenticated.Subject
getSubject()
Get aSubject
that was authenticated.boolean
isPreviousResult()
Get whether this result is the product of an external SSO event and not a new act of authentication.ExternalAuthenticationContext
setAuthnError(String message)
Set an error message from the authentication process.ExternalAuthenticationContext
setAuthnException(Exception exception)
Set an exception from the authentication process.ExternalAuthenticationContext
setAuthnInstant(Instant instant)
Set the time of authentication.ExternalAuthenticationContext
setDoNotCache(boolean flag)
Set the "do not cache" flag.ExternalAuthenticationContext
setFlowExecutionUrl(String url)
Set the flow execution URL to return control to.ExternalAuthenticationContext
setPreviousResult(boolean flag)
Set whether this result is the product of an external SSO event and not a new act of authentication.ExternalAuthenticationContext
setPrincipal(Principal prin)
Set aPrincipal
that was authenticated.ExternalAuthenticationContext
setPrincipalName(String name)
Set the name of a principal that was authenticated.ExternalAuthenticationContext
setSubject(Subject sub)
Set aSubject
that was authenticated.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
-
externalAuthentication
Implementation object. -
flowExecutionUrl
Value of flowExecutionUrl on branching from flow. -
principal
APrincipal
that was authenticated. -
principalName
Name of a principal that was authenticated. -
subject
Name of aSubject
that was authenticated. -
authnInstant
Time of authentication. -
authenticatingAuthorities
Proxied authenticating sources. -
authnError
Error message. -
authnException
Exception. -
doNotCache
private boolean doNotCacheFlag preventing caching of result for SSO. -
previousResult
private boolean previousResultFlag indicating this "new" result is really "old".
-
-
Constructor Details
-
ExternalAuthenticationContext
Constructor.- Parameters:
authentication
- implementation object
-
-
Method Details
-
getExternalAuthentication
Get theExternalAuthentication
object installed in the context.- Returns:
- the external authentication implementation
- Since:
- 4.0.0
-
getFlowExecutionUrl
Get the flow execution URL to return control to.- Returns:
- return location
-
setFlowExecutionUrl
Set the flow execution URL to return control to.- Parameters:
url
- return location- Returns:
- this context
-
getPrincipal
Get aPrincipal
that was authenticated.- Returns:
- the principal
-
setPrincipal
Set aPrincipal
that was authenticated.- Parameters:
prin
- principal to set- Returns:
- this context
-
getPrincipalName
Get the name of a principal that was authenticated.- Returns:
- name of a principal
-
setPrincipalName
Set the name of a principal that was authenticated.- Parameters:
name
- name of principal to set- Returns:
- this context
-
getSubject
Get aSubject
that was authenticated.- Returns:
- subject that was authenticated
-
setSubject
Set aSubject
that was authenticated.- Parameters:
sub
- The subject to set- Returns:
- this context
-
getAuthnInstant
Get the time of authentication.- Returns:
- time of authentication
-
setAuthnInstant
Set the time of authentication.- Parameters:
instant
- time of authentication to set- Returns:
- this context
-
getAuthenticatingAuthorities
Get a mutable, ordered list of proxied authentication sources.- Returns:
- proxied authentication sources
- Since:
- 3.4.0
-
getAuthnError
Get an error message from the authentication process.- Returns:
- an error message
-
setAuthnError
Set an error message from the authentication process.- Parameters:
message
- message to set- Returns:
- this context
-
getAuthnException
Get an exception from the authentication process.- Returns:
- an exception
-
setAuthnException
Set an exception from the authentication process.- Parameters:
exception
- exception to set- Returns:
- this context
-
doNotCache
public boolean doNotCache()Get the "do not cache" flag.- Returns:
- true iff the result of the authentication should not be cached
-
setDoNotCache
Set the "do not cache" flag.- Parameters:
flag
- flag to set- Returns:
- this context
-
isPreviousResult
public boolean isPreviousResult()Get whether this result is the product of an external SSO event and not a new act of authentication.- Returns:
- true iff this result was produced as part of an earlier request
- Since:
- 3.3.0
-
setPreviousResult
Set whether this result is the product of an external SSO event and not a new act of authentication.- Parameters:
flag
- flag to set- Returns:
- this context
- Since:
- 3.3.0
-