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>
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, BaseContext.DeprecatedContextClassNameLookAside -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Collection<String>Proxied authenticating sources.private StringError message.private ExceptionException.private InstantTime of authentication.private booleanFlag preventing caching of result for SSO.private final ExternalAuthenticationImplementation object.private StringValue of flowExecutionUrl on branching from flow.private booleanFlag indicating this "new" result is really "old".private PrincipalAPrincipalthat was authenticated.private StringName of a principal that was authenticated.private SubjectName of aSubjectthat was authenticated. -
Constructor Summary
ConstructorsConstructorDescriptionExternalAuthenticationContext(ExternalAuthentication authentication) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the "do not cache" flag.Get a mutable, ordered list of proxied authentication sources.Get an error message from the authentication process.Get an exception from the authentication process.Get the time of authentication.Get theExternalAuthenticationobject installed in the context.Get the flow execution URL to return control to.Get aPrincipalthat was authenticated.Get the name of a principal that was authenticated.Get aSubjectthat was authenticated.booleanGet whether this result is the product of an external SSO event and not a new act of authentication.setAuthnError(String message) Set an error message from the authentication process.setAuthnException(Exception exception) Set an exception from the authentication process.setAuthnInstant(Instant instant) Set the time of authentication.setDoNotCache(boolean flag) Set the "do not cache" flag.Set the flow execution URL to return control to.setPreviousResult(boolean flag) Set whether this result is the product of an external SSO event and not a new act of authentication.setPrincipal(Principal prin) Set aPrincipalthat was authenticated.setPrincipalName(String name) Set the name of a principal that was authenticated.setSubject(Subject sub) Set aSubjectthat was authenticated.Methods inherited from class org.opensaml.messaging.context.BaseContext
addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, ensureSubcontext, ensureSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, iterator, removeFromParent, removeSubcontext, removeSubcontext, setParentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
externalAuthentication
Implementation object. -
flowExecutionUrl
Value of flowExecutionUrl on branching from flow. -
principal
APrincipalthat was authenticated. -
principalName
Name of a principal that was authenticated. -
subject
Name of aSubjectthat 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 theExternalAuthenticationobject 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 aPrincipalthat was authenticated.- Returns:
- the principal
-
setPrincipal
Set aPrincipalthat 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 aSubjectthat was authenticated.- Returns:
- subject that was authenticated
-
setSubject
Set aSubjectthat 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
-