public class MultiFactorCredentials extends Object implements org.jasig.cas.authentication.principal.Credentials
Credentials implementation that is to ease multifactor authentication.
It primarily carries the following entities:
Because the Credentials itself is simply a marker interface, it is up to each credential
implementation in the chain to decide how it wants to identify itself. This identifier will be used
to locate the particular credential entry in the collection.
The collection of established authentication contexts are ordered, in such a way that each entry in the collection is linked to corresponding leg in the authentication flow.
It is the responsibility of the authentication flow of course, to gather and carry on
the instance of MultiFactorCredentials as it knows how to authenticate the user agent
and is itself the recipient of each credential identifier.
getChainedCredentials(),
getAuthentication(),
Serialized Form| Constructor and Description |
|---|
MultiFactorCredentials() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAuthenticationToChain(org.jasig.cas.authentication.Authentication authentication)
Add the authentication to the chain, having verified
that the resolved principal of the new authentication
matches what has been remembered and collected as the principal.
|
int |
countChainedAuthentications()
Count the number of authentication contexts in the chain.
|
org.jasig.cas.authentication.Authentication |
getAuthentication()
Creates an instance of the
CompositeAuthentication object that collects
and harmonizes all principal and authentication attributes into one context. |
Map<String,org.jasig.cas.authentication.principal.Credentials> |
getChainedCredentials() |
org.jasig.cas.authentication.principal.Credentials |
getCredentials() |
org.jasig.cas.authentication.principal.Principal |
getPrincipal()
Provides the ability to access the resolved
and primary principal based on the authentication context.
|
boolean |
isEmpty()
Indicate whether or not the authentication chain is empty.
|
public final Map<String,org.jasig.cas.authentication.principal.Credentials> getChainedCredentials()
public final boolean isEmpty()
public final int countChainedAuthentications()
public final void addAuthenticationToChain(org.jasig.cas.authentication.Authentication authentication)
authentication - authentication context to add to the chainpublic final org.jasig.cas.authentication.Authentication getAuthentication()
CompositeAuthentication object that collects
and harmonizes all principal and authentication attributes into one context.
Principal attributes are merged from all principals that are already resolved in the authentication chain.
Attributes with the same name that belong to the same principal are merged into one, with the latter value
overwriting the first. The established principal will be one that is based of MutablePrincipal.
Authentication attributes are merged from all authentications that make up the chain.
The merging strategy is such that duplicate attribute names are grouped together into an instance of
a Collection implementation and preserved.
CompositeAuthenticationpublic final org.jasig.cas.authentication.principal.Principal getPrincipal()
public final org.jasig.cas.authentication.principal.Credentials getCredentials()
Copyright © 2013-2015 Unicon Inc.. All Rights Reserved.