Class ParameterCallback
- java.lang.Object
-
- org.wildfly.security.auth.callback.ParameterCallback
-
- All Implemented Interfaces:
Serializable,Callback,ExtendedCallback
public final class ParameterCallback extends Object implements ExtendedCallback, Serializable
A callback used to acquire parameter specifications, either for outbound or inbound authentication. The supplied parameter information may be used to select an authentication mechanism, or to set parameters for an establishing mechanism. The supplied parameter specification should be of a supported type; theisParameterSupported(AlgorithmParameterSpec)andisParameterTypeSupported(Class)methods can be used to query the types that are supported. If no credential is available,nullis set, and authentication may fail. If an unsupported credential type is set, authentication may fail.- Author:
- David M. Lloyd
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ParameterCallback(Class<? extends AlgorithmParameterSpec>... allowedTypes)Construct a new instance.ParameterCallback(AlgorithmParameterSpec parameterSpec, Class<? extends AlgorithmParameterSpec>... allowedTypes)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AlgorithmParameterSpecgetParameterSpec()Get the parameter specification.booleanisOptional()Determine if this callback is optional.booleanisParameterSupported(AlgorithmParameterSpec parameterSpec)Determine whether a parameter specification would be supported by the authentication.booleanisParameterTypeSupported(Class<? extends AlgorithmParameterSpec> parameterType)Determine whether a credential type would be supported by the authentication.booleanneedsInformation()Determine if this callback is requesting information.voidsetParameterSpec(AlgorithmParameterSpec parameterSpec)Set the parameter specification.
-
-
-
Constructor Detail
-
ParameterCallback
@SafeVarargs public ParameterCallback(Class<? extends AlgorithmParameterSpec>... allowedTypes)
Construct a new instance.- Parameters:
allowedTypes- the allowed types of parameter specification
-
ParameterCallback
@SafeVarargs public ParameterCallback(AlgorithmParameterSpec parameterSpec, Class<? extends AlgorithmParameterSpec>... allowedTypes)
Construct a new instance.- Parameters:
parameterSpec- the default parameter spec value, if anyallowedTypes- the allowed types of parameter spec
-
-
Method Detail
-
getParameterSpec
public AlgorithmParameterSpec getParameterSpec()
Get the parameter specification.- Returns:
- the parameter specification, or
nullif it wasn't set yet
-
setParameterSpec
public void setParameterSpec(AlgorithmParameterSpec parameterSpec)
Set the parameter specification.- Parameters:
parameterSpec- the parameter specification, ornullif no parameter specification is available
-
isParameterSupported
public boolean isParameterSupported(AlgorithmParameterSpec parameterSpec)
Determine whether a parameter specification would be supported by the authentication.- Parameters:
parameterSpec- the parameter specification to test- Returns:
trueif the parameter specification is non-nulland supported,falseotherwise
-
isParameterTypeSupported
public boolean isParameterTypeSupported(Class<? extends AlgorithmParameterSpec> parameterType)
Determine whether a credential type would be supported by the authentication.- Parameters:
parameterType- the parameter specification type to test- Returns:
trueif the parameter specification type is supported,falseotherwise
-
isOptional
public boolean isOptional()
Description copied from interface:ExtendedCallbackDetermine if this callback is optional.- Specified by:
isOptionalin interfaceExtendedCallback- Returns:
trueif the callback is optional,falseif it is mandatory
-
needsInformation
public boolean needsInformation()
Description copied from interface:ExtendedCallbackDetermine if this callback is requesting information.- Specified by:
needsInformationin interfaceExtendedCallback- Returns:
trueif the callback is requesting information,falseif it is only providing information
-
-