Package org.jboss.as.connector.security
Class ElytronCallbackHandler
java.lang.Object
org.jboss.as.connector.security.ElytronCallbackHandler
- All Implemented Interfaces:
Serializable,CallbackHandler
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
ConstructorsConstructorDescriptionElytronCallbackHandler(org.wildfly.security.auth.server.SecurityDomain securityDomain, org.jboss.jca.core.spi.security.Callback mappings) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPrivateCredential(Subject subject, Object credential) Add the specified credential to the subject's private credentials set.protected <T> TgetPrivateCredential(Subject subject, Class<T> credentialClass) voidprotected voidhandleInternal(jakarta.security.auth.message.callback.CallerPrincipalCallback callerPrincipalCallback, jakarta.security.auth.message.callback.GroupPrincipalCallback groupPrincipalCallback, jakarta.security.auth.message.callback.PasswordValidationCallback passwordValidationCallback) toString()
-
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
- 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
-
addPrivateCredential
Add the specified credential to the subject's private credentials set.- Parameters:
subject- theSubjectto add the credential to.credential- a reference to the credential.
-
toString
-