Examples of WSSUsernameCallbackHandler


Examples of org.apache.cxf.ws.security.trust.delegation.WSSUsernameCallbackHandler

        );
        doubleIt(bearerPort, 25);
       
        // Change the STSClient so that it can no longer find the STS
        STSClient stsClient = new STSClient(bus);
        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
        BindingProvider p = (BindingProvider)bearerPort;
        p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
       
        // This invocation should be successful as the token is cached
        doubleIt(bearerPort, 25);
       
        //
        // Proxy no. 2
        //
        DoubleItPortType bearerPort2 =
            service.getPort(portQName, DoubleItPortType.class);
        updateAddressPort(bearerPort2, PORT);
        if (standalone) {
            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort2, STSPORT2);
        }
       
        // Change the STSClient so that it can no longer find the STS
        stsClient = new STSClient(bus);
        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
        p = (BindingProvider)bearerPort2;
        p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
       
        // This should fail as the cache is not being used
        try {
View Full Code Here

Examples of org.apache.cxf.ws.security.trust.delegation.WSSUsernameCallbackHandler

            //
        }
       
        // Change the STSClient so that it can no longer find the STS
        STSClient stsClient = new STSClient(bus);
        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
        BindingProvider p = (BindingProvider)bearerPort;
        p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
       
        // Make a successful invocation
        ((BindingProvider)bearerPort).getRequestContext().put(
View Full Code Here

Examples of org.apache.cxf.ws.security.trust.delegation.WSSUsernameCallbackHandler

        );
        doubleIt(bearerPort, 25);
       
        // Change the STSClient so that it can no longer find the STS
        STSClient stsClient = new STSClient(bus);
        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
        p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
       
        // Make a successful invocation - should work as token is cached
        ((BindingProvider)bearerPort).getRequestContext().put(
            "ws-security.username", "alice"
View Full Code Here

Examples of org.apache.cxf.ws.security.trust.delegation.WSSUsernameCallbackHandler

        stsClient.setEnableAppliesTo(false);
        doubleIt(bearerPort, 25);
       
        // Change the STSClient so that it can no longer find the STS
        stsClient = new STSClient(bus);
        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
        stsClient.setEnableAppliesTo(false);
        p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
       
        // This should work
        doubleIt(bearerPort, 25);
View Full Code Here

Examples of org.apache.cxf.ws.security.trust.delegation.WSSUsernameCallbackHandler

        );
        doubleIt(bearerPort, 25);
       
        // Change the STSClient so that it can no longer find the STS
        STSClient stsClient = new STSClient(bus);
        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
        BindingProvider p = (BindingProvider)bearerPort;
        p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
       
        // This invocation should be successful as the token is cached
        doubleIt(bearerPort, 25);
       
        //
        // Proxy no. 2
        //
        DoubleItPortType bearerPort2 =
            service.getPort(portQName, DoubleItPortType.class);
        updateAddressPort(bearerPort2, PORT);
        if (standalone) {
            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort2, STSPORT2);
        }
       
        // Change the STSClient so that it can no longer find the STS
        stsClient = new STSClient(bus);
        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
        p = (BindingProvider)bearerPort2;
        p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
       
        // This should fail as the cache is not being used
        try {
View Full Code Here

Examples of org.apache.cxf.ws.security.trust.delegation.WSSUsernameCallbackHandler

            //
        }
       
        // Change the STSClient so that it can no longer find the STS
        STSClient stsClient = new STSClient(bus);
        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
        BindingProvider p = (BindingProvider)bearerPort;
        p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
       
        // Make a successful invocation
        ((BindingProvider)bearerPort).getRequestContext().put(
View Full Code Here

Examples of org.apache.cxf.ws.security.trust.delegation.WSSUsernameCallbackHandler

        );
        doubleIt(bearerPort, 25);
       
        // Change the STSClient so that it can no longer find the STS
        STSClient stsClient = new STSClient(bus);
        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
        p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
       
        // Make a successful invocation - should work as token is cached
        ((BindingProvider)bearerPort).getRequestContext().put(
            "ws-security.username", "alice"
View Full Code Here

Examples of org.apache.cxf.ws.security.trust.delegation.WSSUsernameCallbackHandler

        stsClient.setEnableAppliesTo(false);
        doubleIt(bearerPort, 25);
       
        // Change the STSClient so that it can no longer find the STS
        stsClient = new STSClient(bus);
        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
        stsClient.setEnableAppliesTo(false);
        p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
       
        // This should work
        doubleIt(bearerPort, 25);
View Full Code Here

Examples of org.apache.cxf.ws.security.trust.delegation.WSSUsernameCallbackHandler

        );
        doubleIt(bearerPort, 25);
       
        // Change the STSClient so that it can no longer find the STS
        STSClient stsClient = new STSClient(bus);
        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
        BindingProvider p = (BindingProvider)bearerPort;
        p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
       
        // This invocation should be successful as the token is cached
        doubleIt(bearerPort, 25);
       
        //
        // Proxy no. 2
        //
        DoubleItPortType bearerPort2 =
            service.getPort(portQName, DoubleItPortType.class);
        updateAddressPort(bearerPort2, PORT);
        if (standalone) {
            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort2, STSPORT2);
        }
       
        // Change the STSClient so that it can no longer find the STS
        stsClient = new STSClient(bus);
        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
        p = (BindingProvider)bearerPort2;
        p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
       
        // This should fail as the cache is not being used
        try {
View Full Code Here

Examples of org.apache.cxf.ws.security.trust.delegation.WSSUsernameCallbackHandler

            //
        }
       
        // Change the STSClient so that it can no longer find the STS
        STSClient stsClient = new STSClient(bus);
        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
        BindingProvider p = (BindingProvider)bearerPort;
        p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
       
        // Make a successful invocation
        ((BindingProvider)bearerPort).getRequestContext().put(
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.