Package org.wildfly.security.mechanism
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 internalMechanismUtil
.Utils to be used by authentication mechanism (SASL or HTTP) implementations.- Author:
- David M. Lloyd
-
-
Constructor Summary
Constructors Modifier Constructor Description private
MechanismUtil()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <S extends Password>
SgetPasswordCredential(String userName, CallbackHandler callbackHandler, Class<S> passwordType, String passwordAlgorithm, AlgorithmParameterSpec matchParameters, AlgorithmParameterSpec generateParameters, Supplier<Provider[]> providers)
Deprecated.static <S extends Password>
SgetPasswordCredential(String userName, CallbackHandler callbackHandler, Class<S> passwordType, String passwordAlgorithm, AlgorithmParameterSpec matchParameters, AlgorithmParameterSpec generateParameters, Supplier<Provider[]> providers, ElytronMessages log)
Deprecated.static void
handleCallbacks(String mechName, CallbackHandler callbackHandler, Callback... callbacks)
Deprecated.static void
handleCallbacks(ElytronMessages log, CallbackHandler callbackHandler, Callback... callbacks)
Deprecated.
-
-
-
Method Detail
-
getPasswordCredential
@Deprecated public static <S extends 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 benull
)callbackHandler
- the callback handler (must not benull
)passwordType
- the password class (must not benull
)passwordAlgorithm
- the password algorithm name (must not benull
)matchParameters
- the optional parameters to match (may benull
)generateParameters
- the optional default parameters to use if the password must be generated (may benull
)providers
- the security providers to use with thePasswordFactory
- Returns:
- the password
- Throws:
AuthenticationMechanismException
-
getPasswordCredential
@Deprecated public static <S extends 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 benull
)callbackHandler
- the callback handler (must not benull
)passwordType
- the password class (must not benull
)passwordAlgorithm
- the password algorithm name (must not benull
)matchParameters
- the optional parameters to match (may benull
)generateParameters
- the optional default parameters to use if the password must be generated (may benull
)providers
- the security providers to use with thePasswordFactory
log
- mechanism specific logger- Returns:
- the password
- Throws:
AuthenticationMechanismException
-
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 purposescallbackHandler
- the callback handlercallbacks
- the callbacks- Throws:
AuthenticationMechanismException
- if the callback handler fails for some reasonUnsupportedCallbackException
- if the callback handler throws this exception
-
handleCallbacks
@Deprecated public static void handleCallbacks(String mechName, CallbackHandler callbackHandler, Callback... callbacks) throws AuthenticationMechanismException, UnsupportedCallbackException
Deprecated.A varargs wrapper method for callback handler invocation.- Parameters:
mechName
- the mechanism name to report for error purposescallbackHandler
- the callback handlercallbacks
- the callbacks- Throws:
AuthenticationMechanismException
- if the callback handler fails for some reasonUnsupportedCallbackException
- if the callback handler throws this exception
-
-