Package javax.security.auth.callback

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


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


            {
               CallbackHandler handler = SecurityActions.getContextCallbackHandler();
               if( handler != null )
               {
                  Callback[] unknown = {c};
                  handler.handle(unknown);
                  return;
               }
            }
            catch (PolicyContextException e)
            {
View Full Code Here

            {
               CallbackHandler handler = SecurityActions.getContextCallbackHandler();
               if( handler != null )
               {
                  Callback[] unknown = {c};
                  handler.handle(unknown);
                  return;
               }
            }
            catch (PolicyContextException e)
            {
View Full Code Here

            }

            if (callbacks.size() > 0)
            {
               Callback[] cb = new Callback[callbacks.size()];
               cbh.handle(callbacks.toArray(cb));
            }

            if (trace)
               log.tracef("Setting authenticated subject (%s) on security context (%s)", executionSubject, sc);
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

                }
               
                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();
                    if (log.isDebugEnabled()) {
                        log.debug("Password : " + password);
                    }
View Full Code Here

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

        try {
            Class<?> cl = Class.forName(clName);
            CallbackHandler cbHand = (CallbackHandler) cl.newInstance();
            PasswordCallback[] pwCb = { new PasswordCallback("password: ", true) }; //$NON-NLS-1$
            cbHand.handle(pwCb);
            return pwCb[0].getPassword();
        } catch (Exception e) {
            throw new UnrecoverableEntryException(e.toString());
        }
    }
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

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.