Examples of CredentialHandler


Examples of org.apache.catalina.CredentialHandler

     * @deprecated  This will be removed in Tomcat 9.0.x as it has been replaced
     *              by the CredentialHandler
     */
    @Deprecated
    public String getDigest() {
        CredentialHandler ch = credentialHandler;
        if (ch instanceof MessageDigestCredentialHandler) {
            return ((MessageDigestCredentialHandler) ch).getAlgorithm();
        }
        return null;
    }
View Full Code Here

Examples of org.apache.catalina.CredentialHandler

     * @deprecated  This will be removed in Tomcat 9.0.x as it has been replaced
     *              by the CredentialHandler
     */
    @Deprecated
    public void setDigest(String digest) {
        CredentialHandler ch = credentialHandler;
        if (ch == null) {
            ch = new MessageDigestCredentialHandler();
            credentialHandler = ch;
        }
        if (ch instanceof MessageDigestCredentialHandler) {
View Full Code Here

Examples of org.apache.catalina.CredentialHandler

     * @deprecated  This will be removed in Tomcat 9.0.x as it has been replaced
     *              by the CredentialHandler
     */
    @Deprecated
    public String getDigestEncoding() {
        CredentialHandler ch = credentialHandler;
        if (ch instanceof MessageDigestCredentialHandler) {
            return ((MessageDigestCredentialHandler) ch).getEncoding();
        }
        return null;
    }
View Full Code Here

Examples of org.apache.catalina.CredentialHandler

     * @deprecated  This will be removed in Tomcat 9.0.x as it has been replaced
     *              by the CredentialHandler
     */
    @Deprecated
    public void setDigestEncoding(String charset) {
        CredentialHandler ch = credentialHandler;
        if (ch == null) {
            ch = new MessageDigestCredentialHandler();
            credentialHandler = ch;
        }
        if (ch instanceof MessageDigestCredentialHandler) {
View Full Code Here

Examples of org.apache.catalina.CredentialHandler

        //   or may nor support -a and may or may not supply a sensible default
        if (algorithm == null && handlerClassName == null) {
            algorithm = "SHA-512";
        }

        CredentialHandler handler = null;

        if (handlerClassName == null) {
            for (Class<? extends DigestCredentialHandlerBase> clazz : credentialHandlerClasses) {
                try {
                    handler = clazz.newInstance();
                    if (IntrospectionUtils.setProperty(handler, "algorithm", algorithm)) {
                        break;
                    }
                } catch (InstantiationException | IllegalAccessException e) {
                    // This isn't good.
                    throw new RuntimeException(e);
                }
            }
        } else {
            try {
                Class<?> clazz = Class.forName(handlerClassName);
                handler = (DigestCredentialHandlerBase) clazz.newInstance();
                IntrospectionUtils.setProperty(handler, "algorithm", algorithm);
            } catch (InstantiationException | IllegalAccessException
                    | ClassNotFoundException e) {
                throw new RuntimeException(e);
            }
        }

        if (handler == null) {
            throw new RuntimeException(new NoSuchAlgorithmException(algorithm));
        }

        IntrospectionUtils.setProperty(handler, "encoding", encoding);
        if (iterations > 0) {
            IntrospectionUtils.setProperty(handler, "iterations", Integer.toString(iterations));
        }
        if (saltLength > -1) {
            IntrospectionUtils.setProperty(handler, "saltLength", Integer.toString(saltLength));
        }
        if (keyLength > 0) {
            IntrospectionUtils.setProperty(handler, "keyLength", Integer.toString(keyLength));
        }

        for (; argIndex < args.length; argIndex++) {
            String credential = args[argIndex];
            System.out.print(credential + ":");
            System.out.println(handler.mutate(credential));
        }
    }
View Full Code Here

Examples of org.apache.jetspeed.security.spi.CredentialHandler

        destroyTestData();
       
        // The LDAP user security handler.
        UserSecurityHandler ldapUsh = new LdapUserSecurityHandler();
        // The LDAP credential handler.
        CredentialHandler ldapCh = new LdapCredentialHandler();
       
        // Security Providers.
        AuthenticationProvider defaultAtnProvider = new AuthenticationProviderImpl("DefaultAuthenticator", "The default authenticator", "login.conf", ch, ush);
        AuthenticationProvider ldapAtnProvider = new AuthenticationProviderImpl("LdapAuthenticator", "The ldap authenticator", ldapCh, ldapUsh);
View Full Code Here

Examples of org.wso2.carbon.business.messaging.paypal.mediator.handler.CredentialHandler

    factory = OMAbstractFactory.getOMFactory();
    urnNS = factory.createOMNamespace("urn:ebay:api:PayPalAPI", "urn");
    urn1NS = factory.createOMNamespace("urn:ebay:apis:eBLBaseComponents",
        "urn1");

    credentialHandler = new CredentialHandler();
  }
View Full Code Here

Examples of org.wso2.carbon.business.messaging.paypal.mediator.ui.handler.CredentialHandler

        factory = OMAbstractFactory.getOMFactory();
        urnNS = factory.createOMNamespace("urn:ebay:api:PayPalAPI", "urn");
        urn1NS = factory.createOMNamespace("urn:ebay:apis:eBLBaseComponents",
                                           "urn1");

        credentialHandler = new CredentialHandler();
    }
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.