public class DefaultAuthenticationTransaction extends java.lang.Object implements AuthenticationTransaction
DefaultAuthenticationTransaction
.Constructor and Description |
---|
DefaultAuthenticationTransaction() |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<Credential> |
getPrimaryCredential()
Gets the first (primary) credential in the chain.
|
boolean |
hasCredentialOfType(java.lang.Class<? extends Credential> type)
Does this AuthenticationTransaction contain a credential of the given type?
|
static DefaultAuthenticationTransaction |
of(Credential... credentials)
Wrap credentials into an authentication transaction, as a factory method,
and return the final result.
|
static DefaultAuthenticationTransaction |
of(Service service,
Credential... credentials)
Wrap credentials into an authentication transaction, as a factory method,
and return the final result.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCredentials, getService
public static DefaultAuthenticationTransaction of(Service service, Credential... credentials)
service
- the servicecredentials
- the credentialspublic static DefaultAuthenticationTransaction of(Credential... credentials)
credentials
- the credentialspublic java.util.Optional<Credential> getPrimaryCredential()
getPrimaryCredential
in interface AuthenticationTransaction
public boolean hasCredentialOfType(java.lang.Class<? extends Credential> type)
hasCredentialOfType
in interface AuthenticationTransaction
type
- the credential type to check for