Package org.apache.cxf.common.security

Examples of org.apache.cxf.common.security.UsernameToken


            password = policy.getPassword();
        } else {
            // try the UsernameToken
            SecurityToken token = message.get(SecurityToken.class);
            if (token != null && token.getTokenType() == TokenType.UsernameToken) {
                UsernameToken ut = (UsernameToken)token;
                name = ut.getName();
                password = ut.getPassword();
            }
        }
       
        if (name == null || password == null) {
            org.apache.cxf.common.i18n.Message errorMsg =
View Full Code Here


            password = policy.getPassword();
        } else {
            // try the UsernameToken
            SecurityToken token = message.get(SecurityToken.class);
            if (token != null && token.getTokenType() == TokenType.UsernameToken) {
                UsernameToken ut = (UsernameToken)token;
                name = ut.getName();
                password = ut.getPassword();
            }
        }
       
        if (name == null || password == null) {
            org.apache.cxf.common.i18n.Message errorMsg =
View Full Code Here

            password = policy.getPassword();
        } else {
            // try the UsernameToken
            SecurityToken token = message.get(SecurityToken.class);
            if (token != null && token.getTokenType() == TokenType.UsernameToken) {
                UsernameToken ut = (UsernameToken)token;
                name = ut.getName();
                password = ut.getPassword();
            }
        }
       
        if (name == null || password == null) {
            org.apache.cxf.common.i18n.Message errorMsg =
View Full Code Here

    public CallbackHandler create(Message message) {
        SecurityToken token = message.get(SecurityToken.class);
        if (!(token instanceof UsernameToken)) {
            return null;
        }
        UsernameToken ut = (UsernameToken)token;
        return new NamePasswordCallbackHandler(ut.getName(), ut.getPassword());
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.common.security.UsernameToken

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.