Package org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.basic

Examples of org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.basic.BasicAuthenticationServicePolicyInterceptor


            for (Axis2HeaderPolicy policy : axis2HeaderPolicies) {
                //Axis2BindingHeaderConfigurator.getHeader(inMC, msg, policy.getHeaderName());
            }

            if (axis2TokenAuthenticationPolicy != null) {
                Axis2SOAPHeaderString tokenHeader = new Axis2SOAPHeaderString();
                Axis2BindingHeaderConfigurator.getHeader(inMC,
                                                         msg,
                                                         axis2TokenAuthenticationPolicy.getTokenName(),
                                                         tokenHeader);
            }
View Full Code Here


    public Message invoke(Message msg) {
        // could call out here to some 3rd party system to get credentials
       
        if ( policy.getTokenName() != null){
            // create Axis representation of header
            Axis2SOAPHeaderString header = new Axis2SOAPHeaderString();
            header.setHeaderName(policy.getTokenName());
            header.setHeaderString("SomeWSAuthorizationToken");
   
            // add header to Tuscany message
            msg.getHeaders().add(header)
        }
       
View Full Code Here

            for (Axis2HeaderPolicy policy : axis2HeaderPolicies){
                //Axis2BindingHeaderConfigurator.getHeader(inMC, msg, policy.getHeaderName());
            }
           
            if (axis2TokenAuthenticationPolicy != null) {
                Axis2SOAPHeaderString tokenHeader = new Axis2SOAPHeaderString();
                Axis2BindingHeaderConfigurator.getHeader(inMC,
                                                         msg,
                                                         axis2TokenAuthenticationPolicy.getTokenName(),
                                                         tokenHeader);
            }
View Full Code Here

        }
    }

    public Message invoke(Message msg) {
       
        Axis2SOAPHeaderString header = (Axis2SOAPHeaderString)Axis2HeaderPolicyUtil.getHeader(msg, policy.getTokenName());
       
        if (header != null) {
            System.out.println("Web service received token: " + header.getHeaderString());
           
            // call out here to some 3rd party system to do whatever you
            // need to turn header credentials into an authenticated principal 
           
            Subject subject = SecurityUtil.getSubject(msg);
            Principal principal = new TokenPrincipal(header.getHeaderString());
            subject.getPrincipals().add(principal);           
        }
   
        return getNext().invoke(msg);
    }
View Full Code Here

            for (Axis2HeaderPolicy policy : axis2HeaderPolicies){
                //Axis2BindingHeaderConfigurator.getHeader(inMC, msg, policy.getHeaderName());
            }
           
            if (axis2TokenAuthenticationPolicy != null) {
                Axis2SOAPHeaderString tokenHeader = new Axis2SOAPHeaderString();
                Axis2BindingHeaderConfigurator.getHeader(inMC,
                                                         msg,
                                                         axis2TokenAuthenticationPolicy.getTokenName(),
                                                         tokenHeader);
            }
View Full Code Here

            for (Axis2HeaderPolicy policy : axis2HeaderPolicies){
                //Axis2BindingHeaderConfigurator.getHeader(inMC, msg, policy.getHeaderName());
            }
           
            if (axis2TokenAuthenticationPolicy != null) {
                Axis2SOAPHeaderString tokenHeader = new Axis2SOAPHeaderString();
                Axis2BindingHeaderConfigurator.getHeader(inMC,
                                                         msg,
                                                         axis2TokenAuthenticationPolicy.getTokenName(),
                                                         tokenHeader);
            }
View Full Code Here

            for (Axis2HeaderPolicy policy : axis2HeaderPolicies){
                //Axis2BindingHeaderConfigurator.getHeader(inMC, msg, policy.getHeaderName());
            }
           
            if (axis2TokenAuthenticationPolicy != null) {
                Axis2SOAPHeaderString tokenHeader = new Axis2SOAPHeaderString();
                Axis2BindingHeaderConfigurator.getHeader(inMC,
                                                         msg,
                                                         axis2TokenAuthenticationPolicy.getTokenName(),
                                                         tokenHeader);
            }
View Full Code Here

        if (isRampartRequired){
            // TODO - do we need to go back to configurator?
        }
       
        if (isMTOMRequired) {
            new Axis2MTOMPolicyProvider(endpoint).configureBinding(configContext);
        }
       
        if (isJMSRequired){
            // TODO - do we need to go back to configurator?
       
View Full Code Here

        if (isRampartRequired){
            Axis2EngineIntegration.loadRampartModule(configContext);
        }
       
        if (isMTOMRequired) {
            new Axis2MTOMPolicyProvider(endpoint).configureBinding(configContext);
        }
       
        if (isJMSRequired){
            // TODO - do we need to go back to configurator?
       
View Full Code Here

        if (isRampartRequired){
            // TODO - do we need to go back to configurator?
        }
       
        if (isMTOMRequired) {
            new Axis2MTOMPolicyProvider(endpoint).configureBinding(configContext);
        }
       
        if (isJMSRequired){
            // TODO - do we need to go back to configurator?
       
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.basic.BasicAuthenticationServicePolicyInterceptor

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.