Package org.apache.cxf.ws.security.trust

Examples of org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken()


        stsClient.setProperties(properties);
        stsClient.setTokenType(tokenType);
        stsClient.setKeyType(keyType);

        return stsClient.requestSecurityToken(endpointUrl);
    }

    protected SecurityToken requestSecurityTokenOnbehalfOf(String tokenType, String keyType, String realm,
        String appliesTo, List<String> claims, Element supportingToken,
        Bus bus, TLSClientParameters tlsClientParameters,
View Full Code Here


        if (claims != null) {
            stsClient.setClaims(createClaimsElement(claims));
        }
        if (appliesTo == null) {

            return stsClient.requestSecurityToken();
        } else {
            stsClient.setAddressingNamespace("http://www.w3.org/2005/08/addressing");
            return stsClient.requestSecurityToken(appliesTo);
        }
    }
View Full Code Here

        if (appliesTo == null) {

            return stsClient.requestSecurityToken();
        } else {
            stsClient.setAddressingNamespace("http://www.w3.org/2005/08/addressing");
            return stsClient.requestSecurityToken(appliesTo);
        }
    }

    protected Element createClaimsElement(List<String> realmClaims) throws Exception {
        if (realmClaims == null || realmClaims.size() == 0) {
View Full Code Here

        stsClient.setProperties(properties);
        stsClient.setTokenType(tokenType);
        stsClient.setKeyType(keyType);
        stsClient.setAddressingNamespace("http://www.w3.org/2005/08/addressing");

        return stsClient.requestSecurityToken(endpointAddress);
    }

    private static void doubleIt(DoubleItPortType port, int numToDouble) {
        int resp = port.doubleIt(numToDouble);
        assertEquals(numToDouble * 2 , resp);
View Full Code Here

                                client.setMessage(message);
                                client.setTrust(getTrust10(aim));
                                client.setTrust(getTrust13(aim));
                                client.setTemplate(itok.getRstTemplate());
                                if (maps == null) {
                                    tok = client.requestSecurityToken();
                                } else {
                                    Object o = message
                                        .getContextualProperty(SecurityConstants.STS_APPLIES_TO);
                                    String s = o == null ? null : o.toString();
                                    s = s == null
View Full Code Here

                                    String s = o == null ? null : o.toString();
                                    s = s == null
                                        ? message.getContextualProperty(Message.ENDPOINT_ADDRESS).toString()
                                            : s;
                                    client.setAddressingNamespace(maps.getNamespaceURI());
                                    tok = client.requestSecurityToken(s);
                                }
                            } catch (RuntimeException e) {
                                throw e;
                            } catch (Exception e) {
                                throw new Fault(e);
View Full Code Here

                            try {
                                client.setTrust(getTrust10(aim));
                                client.setTrust(getTrust13(aim));
                                client.setTemplate(itok.getRstTemplate());
                                if (maps == null) {
                                    tok = client.requestSecurityToken();
                                } else {
                                    Object o = message
                                        .getContextualProperty(SecurityConstants.STS_APPLIES_TO);
                                    String s = o == null ? null : o.toString();
                                    s = s == null
View Full Code Here

                                    String s = o == null ? null : o.toString();
                                    s = s == null
                                        ? message.getContextualProperty(Message.ENDPOINT_ADDRESS).toString()
                                            : s;
                                    client.setAddressingNamespace(maps.getNamespaceURI());
                                    tok = client.requestSecurityToken(s);
                                }
                            } catch (RuntimeException e) {
                                throw e;
                            } catch (Exception e) {
                                throw new Fault(e);
View Full Code Here

        stsClient.setProperties(properties);
        stsClient.setTokenType(tokenType);
        stsClient.setKeyType(keyType);
        stsClient.setAddressingNamespace("http://www.w3.org/2005/08/addressing");

        return stsClient.requestSecurityToken(endpointAddress);
    }
   
    private List<WSSecurityEngineResult> processToken(SecurityToken token) throws Exception {
        RequestData requestData = new RequestData();
        WSSConfig wssConfig = WSSConfig.getNewInstance();
View Full Code Here

       
        stsClient.setProperties(properties);
        stsClient.setTokenType(tokenType);
        stsClient.setKeyType(keyType);
       
        return stsClient.requestSecurityToken(endpointAddress);
    }
   
    private SecurityToken requestSecurityTokenTTL(
            String tokenType,
            String keyType,
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.