public class SubjectContext extends BaseContext
The subject may or may not be authenticated, such as in a back-channel profile, but profiles that operate on subjects can treat the information as "trusted" for their purposes. This context must not be used to carry speculative or unverified subject information.
This is the ultimate product of a successful authentication process.
A second field is available to store an identity that is impersonating the effective subject identity. Profiles should operate on the effective subject unless they need to be aware of both identities.
ProfileRequestContextBaseContext.ContextSetNoRemoveIteratorDecorator| Modifier and Type | Field and Description |
|---|---|
private Map<String,AuthenticationResult> |
authenticationResults
The active authentication results for the subject.
|
private String |
impersonatingPrincipalName
Canonical principal name of an impersonating identity.
|
private String |
principalName
Canonical principal name of subject.
|
| Constructor and Description |
|---|
SubjectContext()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,AuthenticationResult> |
getAuthenticationResults()
Get a mutable map of authentication flow IDs to authentication results.
|
String |
getImpersonatingPrincipalName()
Get the canonical principal name of an identity that is impersonating the subject.
|
String |
getPrincipalName()
Get the canonical principal name of the subject.
|
List<Subject> |
getSubjects()
Get an immutable list of Subjects extracted from every AuthenticationResult
associated with the context.
|
SubjectContext |
setImpersonatingPrincipalName(String name)
Set the canonical principal name of an identity that is impersonating the subject.
|
SubjectContext |
setPrincipalName(String name)
Set the canonical principal name of the subject.
|
addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, isAutoCreateSubcontexts, iterator, removeSubcontext, removeSubcontext, setAutoCreateSubcontexts, setParent@Nullable private String impersonatingPrincipalName
@Nonnull @NonnullElements private final Map<String,AuthenticationResult> authenticationResults
@Nullable public String getPrincipalName()
@Nonnull public SubjectContext setPrincipalName(@Nullable String name)
name - the canonical principal name@Nullable public String getImpersonatingPrincipalName()
@Nonnull public SubjectContext setImpersonatingPrincipalName(@Nullable String name)
name - the canonical principal name of an impersonating identity@Nonnull @NonnullElements @Live public Map<String,AuthenticationResult> getAuthenticationResults()
@Nonnull @NonnullElements @Unmodifiable @NotLive public List<Subject> getSubjects()
Copyright © 1999–2018 Shibboleth Consortium. All rights reserved.