Package org.apereo.cas.authentication
Class DefaultAuthenticationTransaction
- java.lang.Object
-
- org.apereo.cas.authentication.DefaultAuthenticationTransaction
-
- All Implemented Interfaces:
java.io.Serializable,AuthenticationTransaction
public class DefaultAuthenticationTransaction extends java.lang.Object implements AuthenticationTransaction
This isDefaultAuthenticationTransaction.- Since:
- 4.2.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultAuthenticationTransaction()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<Credential>getPrimaryCredential()Gets the first (primary) credential in the chain.booleanhasCredentialOfType(java.lang.Class<? extends Credential> type)Does this AuthenticationTransaction contain a credential of the given type?static DefaultAuthenticationTransactionof(Credential... credentials)Wrap credentials into an authentication transaction, as a factory method, and return the final result.static DefaultAuthenticationTransactionof(Service service, Credential... credentials)Wrap credentials into an authentication transaction, as a factory method, and return the final result.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apereo.cas.authentication.AuthenticationTransaction
getCredentials, getCredentialsOfType, getService
-
-
-
-
Method Detail
-
of
public static DefaultAuthenticationTransaction of(Service service, Credential... credentials)
Wrap credentials into an authentication transaction, as a factory method, and return the final result.- Parameters:
service- the servicecredentials- the credentials- Returns:
- the authentication transaction
-
of
public static DefaultAuthenticationTransaction of(Credential... credentials)
Wrap credentials into an authentication transaction, as a factory method, and return the final result.- Parameters:
credentials- the credentials- Returns:
- the authentication transaction
-
getPrimaryCredential
public java.util.Optional<Credential> getPrimaryCredential()
Gets the first (primary) credential in the chain.- Specified by:
getPrimaryCredentialin interfaceAuthenticationTransaction- Returns:
- the credential
-
hasCredentialOfType
public boolean hasCredentialOfType(java.lang.Class<? extends Credential> type)
Does this AuthenticationTransaction contain a credential of the given type?- Specified by:
hasCredentialOfTypein interfaceAuthenticationTransaction- Parameters:
type- the credential type to check for- Returns:
- true if this AuthenticationTransaction contains a credential of the specified type
-
-