Package org.picketlink.identity.federation.api.wstrust.WSTrustClient

Examples of org.picketlink.identity.federation.api.wstrust.WSTrustClient.SecurityInfo


        String userName = (args.length > 0 ? args[0] : "tomcat");
        String password = (args.length > 1 ? args[1] : "tomcat");
       
        // Step 1: Create a WS Trust Client
        WSTrustClient client = new WSTrustClient("PicketLinkSTS", "PicketLinkSTSPort", "http://localhost:8080/picketlink-sts/PicketLinkSTS",
                new SecurityInfo(userName, password));
        Element assertionElement = null;
        try {
            System.out.println("Invoking token service to get SAML assertion for user:" + userName + " with password:" + password);
            // Step 2: Get a SAML2 Assertion Token from the PicketLink STS
            assertionElement = client.issueToken(SAMLUtil.SAML2_TOKEN_TYPE);
View Full Code Here


  public Element testSTS() throws Exception
  {
    // create a WSTrustClient instance.
    WSTrustClient client = new WSTrustClient("PicketLinkSTS", "PicketLinkSTSPort",
      "http://localhost:8080/picketlink-sts/PicketLinkSTS",
      new SecurityInfo("admin", "admin"));
   
    // issue a SAML assertion using the client API.
    Element assertion = null;
    try
    {
View Full Code Here

  public Element testSTS() throws Exception
  {
    WSTrustClient client = new WSTrustClient("PicketLinkSTS", "PicketLinkSTSPort",
      "http://localhost:8080/picketlink-sts/PicketLinkSTS",
      new SecurityInfo("UserB", "PassB"));
   
    Element assertion = null;
    try
    {
      RequestSecurityToken request = new RequestSecurityToken();
View Full Code Here

                    builder = new Builder(propertiesFile);
                } else
                    throw logger.optionNotSet("propertiesFile");
            }
            WSTrustClient client = new WSTrustClient(builder.getServiceName(), builder.getPortName(),
                    builder.getEndpointAddress(), new SecurityInfo(principal.getName(), credential));
            Element assertion = null;
            try {
                logger.trace("Invoking token service to get SAML assertion for " + principal.getName());
                // create the token
                assertion = client.issueToken(SAMLUtil.SAML2_TOKEN_TYPE);
View Full Code Here

        }
    }

    private static Element getAssertion() throws Exception {
        WSTrustClient client = new WSTrustClient("PicketLinkSTS", "PicketLinkSTSPort",
            "http://localhost:8080/picketlink-sts/PicketLinkSTS", new SecurityInfo("admin", "admin"));
        //Element assertion = client.issueTokenForEndpoint("urn:switchyard-quickstart-demo:policy-security-saml:0.1.0");
        Element assertion = client.issueToken(SAMLUtil.SAML2_TOKEN_TYPE);
        /*
        boolean valid = client.validateToken(assertion);
        if (valid) {
View Full Code Here

TOP

Related Classes of org.picketlink.identity.federation.api.wstrust.WSTrustClient.SecurityInfo

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.