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; 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 Details

    • 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 any
      allowedTypes - the allowed types of parameter spec
  • Method Details

    • getParameterSpec

      public AlgorithmParameterSpec getParameterSpec()
      Get the parameter specification.
      Returns:
      the parameter specification, or null if it wasn't set yet
    • setParameterSpec

      public void setParameterSpec(AlgorithmParameterSpec parameterSpec)
      Set the parameter specification.
      Parameters:
      parameterSpec - the parameter specification, or null if 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:
      true if the parameter specification is non-null and supported, false otherwise
    • 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:
      true if the parameter specification type is supported, false otherwise
    • isOptional

      public boolean isOptional()
      Description copied from interface: ExtendedCallback
      Determine if this callback is optional.
      Specified by:
      isOptional in interface ExtendedCallback
      Returns:
      true if the callback is optional, false if it is mandatory
    • needsInformation

      public boolean needsInformation()
      Description copied from interface: ExtendedCallback
      Determine if this callback is requesting information.
      Specified by:
      needsInformation in interface ExtendedCallback
      Returns:
      true if the callback is requesting information, false if it is only providing information