Package org.switchyard.security.callback

Examples of org.switchyard.security.callback.CertificateCallback


     */
    @Override
    public boolean login() throws LoginException {
        NameCallback aliasCallback = new NameCallback("alias");
        //PasswordCallback keyPasswordCallback = new PasswordCallback("keyPassword", false);
        CertificateCallback certificateCallback = new CertificateCallback();
        try {
            //getCallbackHandler().handle(new Callback[]{aliasCallback, keyPasswordCallback, certificateCallback});
            getCallbackHandler().handle(new Callback[]{aliasCallback, certificateCallback});
        } catch (IOException ioe) {
            throw BaseSecurityMessages.MESSAGES.failedInvokeCallback(ioe.getMessage(), ioe);
View Full Code Here


            if (cb instanceof NameCallback) {
                ((NameCallback)cb).setName(alias);
            } else if (cb instanceof PasswordCallback && keyPassword != null) {
                ((PasswordCallback)cb).setPassword(keyPassword.toCharArray());
            } else if (cb instanceof CertificateCallback) {
                CertificateCallback cert_cb = (CertificateCallback)cb;
                for (Credential cred : credentials) {
                    if (cred instanceof CertificateCredential) {
                        cert_cb.addCertificate(((CertificateCredential)cred).getCertificate());
                    }
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.switchyard.security.callback.CertificateCallback

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.