Package org.jboss.as.web.security.jaspi

Examples of org.jboss.as.web.security.jaspi.WebJASPICallbackHandler


     * @param password      a {@code String} representing the password.
     */
    protected void registerWithCallbackHandler(Principal userPrincipal, String username,
                                               String password) {
        if (this.callbackHandler instanceof WebJASPICallbackHandler) {
            WebJASPICallbackHandler cbh = (WebJASPICallbackHandler) callbackHandler;

            PasswordValidationCallback passwordValidationCallback =
                    new PasswordValidationCallback(null, username, password.toCharArray());
            CallerPrincipalCallback callerCallback = new CallerPrincipalCallback(null, userPrincipal);
            try {
                cbh.handle(new Callback[] {passwordValidationCallback, callerCallback});
            } catch (Exception e) {
                throw new RuntimeException("Error handling callbacks: " + e.getLocalizedMessage(), e);
            }
        } else
            throw new RuntimeException(" Unsupported Callback handler " + this.callbackHandler.getClass().
View Full Code Here

TOP

Related Classes of org.jboss.as.web.security.jaspi.WebJASPICallbackHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.