public final class ParameterCallback extends Object implements ExtendedCallback, Serializable
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.Constructor and Description |
---|
ParameterCallback(AlgorithmParameterSpec parameterSpec,
Class<? extends AlgorithmParameterSpec>... allowedTypes)
Construct a new instance.
|
ParameterCallback(Class<? extends AlgorithmParameterSpec>... allowedTypes)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
AlgorithmParameterSpec |
getParameterSpec()
Get the parameter specification.
|
boolean |
isOptional()
Determine if this callback is optional.
|
boolean |
isParameterSupported(AlgorithmParameterSpec parameterSpec)
Determine whether a parameter specification would be supported by the authentication.
|
boolean |
isParameterTypeSupported(Class<? extends AlgorithmParameterSpec> parameterType)
Determine whether a credential type would be supported by the authentication.
|
boolean |
needsInformation()
Determine if this callback is requesting information.
|
void |
setParameterSpec(AlgorithmParameterSpec parameterSpec)
Set the parameter specification.
|
@SafeVarargs public ParameterCallback(Class<? extends AlgorithmParameterSpec>... allowedTypes)
allowedTypes
- the allowed types of parameter specification@SafeVarargs public ParameterCallback(AlgorithmParameterSpec parameterSpec, Class<? extends AlgorithmParameterSpec>... allowedTypes)
parameterSpec
- the default parameter spec value, if anyallowedTypes
- the allowed types of parameter specpublic AlgorithmParameterSpec getParameterSpec()
null
if it wasn't set yetpublic void setParameterSpec(AlgorithmParameterSpec parameterSpec)
parameterSpec
- the parameter specification, or null
if no parameter specification is availablepublic boolean isParameterSupported(AlgorithmParameterSpec parameterSpec)
parameterSpec
- the parameter specification to testtrue
if the parameter specification is non-null
and supported, false
otherwisepublic boolean isParameterTypeSupported(Class<? extends AlgorithmParameterSpec> parameterType)
parameterType
- the parameter specification type to testtrue
if the parameter specification type is supported, false
otherwisepublic boolean isOptional()
ExtendedCallback
isOptional
in interface ExtendedCallback
true
if the callback is optional, false
if it is mandatorypublic boolean needsInformation()
ExtendedCallback
needsInformation
in interface ExtendedCallback
true
if the callback is requesting information, false
if it is only providing informationCopyright © 2020 JBoss by Red Hat. All rights reserved.