Class CredentialCallback
- java.lang.Object
-
- org.wildfly.security.auth.callback.AbstractCredentialCallback
-
- org.wildfly.security.auth.callback.CredentialCallback
-
- All Implemented Interfaces:
Callback
,ExtendedCallback
public final class CredentialCallback extends AbstractCredentialCallback
A callback used to acquire credentials. On the client side of an authentication mechanism, the callback handler is required to supply a credential for use in outbound authentication. On the server side, the callback handler is required to supply a credential for use in inbound authentication, possibly for both verification as well as establishing authentication parameters.This callback must be handled if a default credential was not supplied. The callback handler is expected to provide a credential to this callback if one is not present. If no credential is available,
null
is set, and authentication may fail. If an unsupported credential type is set, an exception is thrown.- Author:
- David M. Lloyd
-
-
Constructor Summary
Constructors Constructor Description CredentialCallback(Class<? extends Credential> credentialType)
Construct a new instance which accepts any algorithm name or parameters.CredentialCallback(Class<? extends Credential> credentialType, String algorithm)
Construct a new instance which accepts any parameters.CredentialCallback(Class<? extends Credential> credentialType, String algorithm, AlgorithmParameterSpec parameterSpec)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isOptional()
Determine if this callback is optional.-
Methods inherited from class org.wildfly.security.auth.callback.AbstractCredentialCallback
applyToCredential, applyToCredential, applyToCredential, getAlgorithm, getCredential, getCredential, getCredential, getCredential, getCredentialType, getParameterSpec, isCredentialSupported, isCredentialTypeSupported, isCredentialTypeSupported, isCredentialTypeSupported, needsInformation, setCredential
-
-
-
-
Constructor Detail
-
CredentialCallback
public CredentialCallback(Class<? extends Credential> credentialType, String algorithm, AlgorithmParameterSpec parameterSpec)
Construct a new instance.- Parameters:
credentialType
- the desired credential type (must not benull
)algorithm
- the algorithm name, ornull
if any algorithm is suitable or the credential type does not use algorithm namesparameterSpec
- the parameters to match, ornull
if any parameters are acceptable or the credential type does not support parameters
-
CredentialCallback
public CredentialCallback(Class<? extends Credential> credentialType, String algorithm)
Construct a new instance which accepts any parameters.- Parameters:
credentialType
- the desired credential type (must not benull
)algorithm
- the algorithm name, ornull
if any algorithm is suitable or the credential type does not use algorithm names
-
CredentialCallback
public CredentialCallback(Class<? extends Credential> credentialType)
Construct a new instance which accepts any algorithm name or parameters.- Parameters:
credentialType
- the desired credential type (must not benull
)
-
-
Method Detail
-
isOptional
public boolean isOptional()
Description copied from interface:ExtendedCallback
Determine if this callback is optional.- Returns:
true
if the callback is optional,false
if it is mandatory
-
-