Package org.jboss.as.connector.security
Class ElytronCallbackHandler
- java.lang.Object
-
- org.jboss.as.connector.security.ElytronCallbackHandler
-
- All Implemented Interfaces:
Serializable,CallbackHandler
public class ElytronCallbackHandler extends Object implements CallbackHandler, Serializable
An Elytron basedCallbackHandlerimplementation designed for the Jakarta Connectors security inflow. It uses the information obtained from theCallbacks to authenticate and authorize the identity supplied by the resource adapter and inserts theSecurityIdentityrepresenting the authorized identity in the subject's private credentials set.- Author:
- Flavia Rainone, Stefan Guilhen
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ElytronCallbackHandler(org.wildfly.security.auth.server.SecurityDomain securityDomain, org.jboss.jca.core.spi.security.Callback mappings)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddPrivateCredential(Subject subject, Object credential)Add the specified credential to the subject's private credentials set.protected <T> TgetPrivateCredential(Subject subject, Class<T> credentialClass)voidhandle(Callback[] callbacks)protected voidhandleInternal(jakarta.security.auth.message.callback.CallerPrincipalCallback callerPrincipalCallback, jakarta.security.auth.message.callback.GroupPrincipalCallback groupPrincipalCallback, jakarta.security.auth.message.callback.PasswordValidationCallback passwordValidationCallback)StringtoString()
-
-
-
Constructor Detail
-
ElytronCallbackHandler
public ElytronCallbackHandler(org.wildfly.security.auth.server.SecurityDomain securityDomain, org.jboss.jca.core.spi.security.Callback mappings)Constructor- Parameters:
securityDomain- the Elytron security domain used to establish the caller principal.mappings- The mappings.
-
-
Method Detail
-
handle
public void handle(Callback[] callbacks) throws UnsupportedCallbackException, IOException
- Specified by:
handlein interfaceCallbackHandler- Throws:
UnsupportedCallbackExceptionIOException
-
handleInternal
protected void handleInternal(jakarta.security.auth.message.callback.CallerPrincipalCallback callerPrincipalCallback, jakarta.security.auth.message.callback.GroupPrincipalCallback groupPrincipalCallback, jakarta.security.auth.message.callback.PasswordValidationCallback passwordValidationCallback) throws IOException- Throws:
IOException
-
getPrivateCredential
protected <T> T getPrivateCredential(Subject subject, Class<T> credentialClass)
-
addPrivateCredential
protected void addPrivateCredential(Subject subject, Object credential)
Add the specified credential to the subject's private credentials set.- Parameters:
subject- theSubjectto add the credential to.credential- a reference to the credential.
-
-