Package org.apereo.cas.authentication
Interface AuthenticationTransaction
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
DefaultAuthenticationTransaction
public interface AuthenticationTransaction extends java.io.SerializableThis isAuthenticationTransaction.- Since:
- 4.2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.Collection<Credential>getCredentials()Gets credentials.default <T extends Credential>
java.util.Collection<T>getCredentialsOfType(java.lang.Class<T> type)Gets credentials of type.default java.util.Optional<Credential>getPrimaryCredential()Gets the first (primary) credential in the chain.ServicegetService()Gets service linked to this transaction.default booleanhasCredentialOfType(java.lang.Class<? extends Credential> type)Does this AuthenticationTransaction contain a credential of the given type?
-
-
-
Method Detail
-
getService
Service getService()
Gets service linked to this transaction.- Returns:
- the service
-
getCredentials
java.util.Collection<Credential> getCredentials()
Gets credentials.- Returns:
- the credentials
-
getPrimaryCredential
default java.util.Optional<Credential> getPrimaryCredential()
Gets the first (primary) credential in the chain.- Returns:
- the credential
-
hasCredentialOfType
default boolean hasCredentialOfType(java.lang.Class<? extends Credential> type)
Does this AuthenticationTransaction contain a credential of the given type?- Parameters:
type- the credential type to check for- Returns:
- true if this AuthenticationTransaction contains a credential of the specified type
-
getCredentialsOfType
default <T extends Credential> java.util.Collection<T> getCredentialsOfType(java.lang.Class<T> type)
Gets credentials of type.- Type Parameters:
T- the type parameter- Parameters:
type- the type- Returns:
- the credentials of type
-
-