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 based CallbackHandler implementation designed for the Jakarta Connectors security inflow. It uses the information obtained from the Callbacks to authenticate and authorize the identity supplied by the resource adapter and inserts the SecurityIdentity representing the authorized identity in the subject's private credentials set.
Author:
Flavia Rainone, Stefan Guilhen
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    ElytronCallbackHandler(org.wildfly.security.auth.server.SecurityDomain securityDomain, org.jboss.jca.core.spi.security.Callback mappings)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addPrivateCredential(Subject subject, Object credential)
    Add the specified credential to the subject's private credentials set.
    protected <T> T
    getPrivateCredential(Subject subject, Class<T> credentialClass)
     
    void
    handle(Callback[] callbacks)
    protected void
    handleInternal(jakarta.security.auth.message.callback.CallerPrincipalCallback callerPrincipalCallback, jakarta.security.auth.message.callback.GroupPrincipalCallback groupPrincipalCallback, jakarta.security.auth.message.callback.PasswordValidationCallback passwordValidationCallback)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

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

    • handle

      public void handle(Callback[] callbacks) throws UnsupportedCallbackException, IOException
      Specified by:
      handle in interface CallbackHandler
      Throws:
      UnsupportedCallbackException
      IOException
    • 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 - the Subject to add the credential to.
      credential - a reference to the credential.
    • toString

      public String toString()
      Overrides:
      toString in class Object