Class MechanismUtil

java.lang.Object
org.wildfly.security.mechanism.MechanismUtil

@Deprecated public final class MechanismUtil extends Object
Deprecated.
Should not be part of public API. Moved into internal org.wildfly.security.mechanism._private.MechanismUtil.
Utils to be used by authentication mechanism (SASL or HTTP) implementations.
Author:
David M. Lloyd
  • Method Details

    • getPasswordCredential

      @Deprecated public static <S extends org.wildfly.security.password.Password> S getPasswordCredential(String userName, CallbackHandler callbackHandler, Class<S> passwordType, String passwordAlgorithm, AlgorithmParameterSpec matchParameters, AlgorithmParameterSpec generateParameters, Supplier<Provider[]> providers) throws AuthenticationMechanismException
      Deprecated.
      Get a password from a client or server callback, falling back to clear password if needed. Note that the parameters, while optional, may be required on the client side of some mechanisms in order to ensure that the encoded password is compatible with the server challenge.
      Type Parameters:
      S - the password type
      Parameters:
      userName - the user name to report for error reporting purposes (must not be null)
      callbackHandler - the callback handler (must not be null)
      passwordType - the password class (must not be null)
      passwordAlgorithm - the password algorithm name (must not be null)
      matchParameters - the optional parameters to match (may be null)
      generateParameters - the optional default parameters to use if the password must be generated (may be null)
      providers - the security providers to use with the PasswordFactory
      Returns:
      the password
      Throws:
      AuthenticationMechanismException - if there is an error retrieving the password
    • getPasswordCredential

      @Deprecated public static <S extends org.wildfly.security.password.Password> S getPasswordCredential(String userName, CallbackHandler callbackHandler, Class<S> passwordType, String passwordAlgorithm, AlgorithmParameterSpec matchParameters, AlgorithmParameterSpec generateParameters, Supplier<Provider[]> providers, ElytronMessages log) throws AuthenticationMechanismException
      Deprecated.
      Get a password from a client or server callback, falling back to clear password if needed. Note that the parameters, while optional, may be required on the client side of some mechanisms in order to ensure that the encoded password is compatible with the server challenge.
      Type Parameters:
      S - the password type
      Parameters:
      userName - the user name to report for error reporting purposes (must not be null)
      callbackHandler - the callback handler (must not be null)
      passwordType - the password class (must not be null)
      passwordAlgorithm - the password algorithm name (must not be null)
      matchParameters - the optional parameters to match (may be null)
      generateParameters - the optional default parameters to use if the password must be generated (may be null)
      providers - the security providers to use with the PasswordFactory
      log - mechanism specific logger
      Returns:
      the password
      Throws:
      AuthenticationMechanismException - if there is an error retrieving the password
    • handleCallbacks

      @Deprecated public static void handleCallbacks(ElytronMessages log, CallbackHandler callbackHandler, Callback... callbacks) throws AuthenticationMechanismException, UnsupportedCallbackException
      Deprecated.
      A varargs wrapper method for callback handler invocation.
      Parameters:
      log - the logger for error purposes
      callbackHandler - the callback handler
      callbacks - the callbacks
      Throws:
      AuthenticationMechanismException - if the callback handler fails for some reason
      UnsupportedCallbackException - if the callback handler throws this exception
    • handleCallbacks

      @Deprecated public static void handleCallbacks(String mechName, CallbackHandler callbackHandler, Callback... callbacks) throws AuthenticationMechanismException, UnsupportedCallbackException
      A varargs wrapper method for callback handler invocation.
      Parameters:
      mechName - the mechanism name to report for error purposes
      callbackHandler - the callback handler
      callbacks - the callbacks
      Throws:
      AuthenticationMechanismException - if the callback handler fails for some reason
      UnsupportedCallbackException - if the callback handler throws this exception