Class ParameterCallback
java.lang.Object
org.wildfly.security.auth.callback.ParameterCallback
- All Implemented Interfaces:
Serializable,Callback,ExtendedCallback
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; the
isParameterSupported(AlgorithmParameterSpec) and isParameterTypeSupported(Class) methods can be
used to query the types that are supported. If no credential is available, null is set, and
authentication may fail. If an unsupported credential type is set, authentication may fail.- Author:
- David M. Lloyd
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionParameterCallback(Class<? extends AlgorithmParameterSpec>... allowedTypes) Construct a new instance.ParameterCallback(AlgorithmParameterSpec parameterSpec, Class<? extends AlgorithmParameterSpec>... allowedTypes) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionGet the parameter specification.booleanDetermine 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.booleanDetermine if this callback is requesting information.voidsetParameterSpec(AlgorithmParameterSpec parameterSpec) Set the parameter specification.
-
Constructor Details
-
ParameterCallback
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 Details
-
getParameterSpec
Get the parameter specification.- Returns:
- the parameter specification, or
nullif it wasn't set yet
-
setParameterSpec
Set the parameter specification.- Parameters:
parameterSpec- the parameter specification, ornullif no parameter specification is available
-
isParameterSupported
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
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
-