Package javax.security.auth.callback

Examples of javax.security.auth.callback.CallbackHandler.handle()


            return null;
        }
       
        WSPasswordCallback[] cb = {new WSPasswordCallback(userName, type)};
        try {
            handler.handle(cb);
        } catch (Exception e) {
            policyNotAsserted(info, e);
        }
       
        //get the password
View Full Code Here


                LOG.fine("Signature alias is null so using default alias: " + alias);
            }
            // Get the password
            WSPasswordCallback[] cb = {new WSPasswordCallback(alias, WSPasswordCallback.SIGNATURE)};
            LOG.fine("Creating SAML Token");
            callbackHandler.handle(cb);
            String password = cb[0].getPassword();
   
            LOG.fine("Signing SAML Token");
            boolean useKeyValue = signatureProperties.isUseKeyValue();
            assertion.signAssertion(
View Full Code Here

            return null;
        }
       
        WSPasswordCallback[] cb = {new WSPasswordCallback(userName, type)};
        try {
            handler.handle(cb);
        } catch (Exception e) {
            policyNotAsserted(info, e, message);
        }
       
        //get the password
View Full Code Here

                LOG.fine("Signature alias is null so using default alias: " + alias);
            }
            // Get the password
            WSPasswordCallback[] cb = {new WSPasswordCallback(alias, WSPasswordCallback.SIGNATURE)};
            LOG.fine("Creating SAML Token");
            callbackHandler.handle(cb);
            String password = cb[0].getPassword();
   
            LOG.fine("Signing SAML Token");
            boolean useKeyValue = signatureProperties.isUseKeyValue();
            assertion.signAssertion(
View Full Code Here

            return null;
        }
       
        WSPasswordCallback[] cb = {new WSPasswordCallback(userName, type)};
        try {
            handler.handle(cb);
        } catch (Exception e) {
            policyNotAsserted(info, e);
        }
       
        //get the password
View Full Code Here

                }
               
                WSPasswordCallback[] cb = { new WSPasswordCallback(user,
                        WSPasswordCallback.USERNAME_TOKEN) };
                try {
                    handler.handle(cb);
                } catch (Exception e) {
                    throw new RampartException("errorInGettingPasswordForUser",
                            new String[]{user}, e);
                }
               
View Full Code Here

           
            WSPasswordCallback[] cb = { new WSPasswordCallback(user,
                    WSPasswordCallback.SIGNATURE) };
           
            try {
                handler.handle(cb);
                if(cb[0].getPassword() != null && !"".equals(cb[0].getPassword())) {
                    password = cb[0].getPassword();
                    log.debug("Password : " + password);
                } else {
                    //If there's no password then throw an exception
View Full Code Here

        public void validate(TimestampValidationCallback.Request request)
                throws TimestampValidationCallback.TimestampValidationException {
            for (int i = 0; i < getCallbackHandlers().length; i++) {
                CallbackHandler callbackHandler = getCallbackHandlers()[i];
                try {
                    callbackHandler.handle(new Callback[]{callback});
                    callback.getResult();
                }
                catch (IOException e) {
                    throw new TimestampValidationCallback.TimestampValidationException(e);
                }
View Full Code Here

                throws PasswordValidationCallback.PasswordValidationException {
            boolean allUnsupported = true;
            for (int i = 0; i < getCallbackHandlers().length; i++) {
                CallbackHandler callbackHandler = getCallbackHandlers()[i];
                try {
                    callbackHandler.handle(new Callback[]{callback});
                    allUnsupported = false;
                    if (!callback.getResult()) {
                        return false;
                    }
                }
View Full Code Here

                throws CertificateValidationCallback.CertificateValidationException {
            boolean allUnsupported = true;
            for (int i = 0; i < getCallbackHandlers().length; i++) {
                CallbackHandler callbackHandler = getCallbackHandlers()[i];
                try {
                    callbackHandler.handle(new Callback[]{callback});
                    allUnsupported = false;
                    if (!callback.getResult()) {
                        return false;
                    }
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.