Class ServerCredentialCallback
java.lang.Object
org.wildfly.security.auth.callback.AbstractCredentialCallback
org.wildfly.security.auth.callback.ServerCredentialCallback
- All Implemented Interfaces:
Callback,ExtendedCallback
A callback used to acquire the server (or "host") credential. This callback is only used on the server side of
authentication mechanisms; client callback handlers do not need to recognize this callback. The callback handler is
expected to provide a credential to this callback. 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
ConstructorsConstructorDescriptionServerCredentialCallback(Class<? extends Credential> credentialType) Construct a new instance which accepts any algorithm name.ServerCredentialCallback(Class<? extends Credential> credentialType, String algorithm) Construct a new instance.ServerCredentialCallback(Class<? extends Credential> credentialType, String algorithm, AlgorithmParameterSpec parameterSpec) Construct a new instance. -
Method Summary
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 Details
-
ServerCredentialCallback
public ServerCredentialCallback(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, ornullif any algorithm is suitable or the credential type does not use algorithm namesparameterSpec- the parameters to use ornullfor no parameters
-
ServerCredentialCallback
Construct a new instance.- Parameters:
credentialType- the desired credential type (must not benull)algorithm- the algorithm name, ornullif any algorithm is suitable or the credential type does not use algorithm names
-
ServerCredentialCallback
Construct a new instance which accepts any algorithm name.- Parameters:
credentialType- the desired credential type (must not benull)
-
-
Method Details
-
isOptional
public boolean isOptional()Description copied from interface:ExtendedCallbackDetermine if this callback is optional.- Returns:
trueif the callback is optional,falseif it is mandatory
-