Package org.wildfly.security.auth.realm
Class JaasSecurityRealm.JaasSecurityRealmDefaultCallbackHandler
- java.lang.Object
-
- org.wildfly.security.auth.realm.JaasSecurityRealm.JaasSecurityRealmDefaultCallbackHandler
-
- All Implemented Interfaces:
CallbackHandler
- Enclosing class:
- JaasSecurityRealm
private static class JaasSecurityRealm.JaasSecurityRealmDefaultCallbackHandler extends Object implements CallbackHandler
Default CallbackHandler passed to the LoginContext when none is provided to JAAS security realm and none is configured in the "auth.login.defaultCallbackHandler" security property.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
JaasSecurityRealmDefaultCallbackHandler(Principal principal, Evidence evidence)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private char[]
getPassword()
Source: A utility method for obtaining of password taken from https://github.com/picketbox/picketbox/blob/master/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/auth/callback/JBossCallbackHandler.java on November 2021void
handle(Callback[] callbacks)
-
-
-
Method Detail
-
handle
public void handle(Callback[] callbacks) throws UnsupportedCallbackException
- Specified by:
handle
in interfaceCallbackHandler
- Throws:
UnsupportedCallbackException
-
getPassword
private char[] getPassword()
Source: A utility method for obtaining of password taken from https://github.com/picketbox/picketbox/blob/master/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/auth/callback/JBossCallbackHandler.java on November 2021Try to convert the credential value into a char[] using the first of the following attempts which succeeds:
1. Check for instanceof char[] 2. Check for instanceof String and then use toCharArray() 3. See if credential has a toCharArray() method and use it 4. Use toString() followed by toCharArray().
- Returns:
- a char[] representation of the credential.
-
-