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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Collection<String>
Proxied authenticating sources.private String
Error message.private Exception
Exception.private Instant
Time of authentication.private boolean
Flag preventing caching of result for SSO.private final ExternalAuthentication
Implementation object.private String
Value of flowExecutionUrl on branching from flow.private boolean
Flag indicating this "new" result is really "old".private Principal
APrincipal
that was authenticated.private String
Name of a principal that was authenticated.private Subject
Name of aSubject
that was authenticated. -
Constructor Summary
ConstructorsConstructorDescriptionExternalAuthenticationContext
(ExternalAuthentication authentication) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get 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 theExternalAuthentication
object installed in the context.Get the flow execution URL to return control to.Get aPrincipal
that was authenticated.Get the name of a principal that was authenticated.Get aSubject
that was authenticated.boolean
Get 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 aPrincipal
that was authenticated.setPrincipalName
(String name) Set the name of a principal that was authenticated.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
-