Examples of SecurityInfo


Examples of org.gatein.pc.api.info.SecurityInfo

   }

   public SecurityInfo getSecurity()
   {
      // todo: get more details on the SecurityInfo contract...
      return new SecurityInfo()
      {
         public boolean containsTransportGuarantee(TransportGuarantee transportGuarantee)
         {
            return TransportGuarantee.NONE.equals(transportGuarantee);
         }
View Full Code Here

Examples of org.gatein.pc.api.info.SecurityInfo

                  }
               }
            }

            // security
            SecurityInfo secInfo = info.getSecurity();
            if (secInfo.containsTransportGuarantee(TransportGuarantee.INTEGRAL)
               || secInfo.containsTransportGuarantee(TransportGuarantee.CONFIDENTIAL))
            {
               desc.setOnlySecure(true);
            }

            // add the portlet description to the appropriate PortletDescriptionInfo
View Full Code Here

Examples of org.gatein.pc.api.info.SecurityInfo

   public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
   {
      PortletContainer container = (PortletContainer)invocation.getAttribute(ContainerPortletInvoker.PORTLET_CONTAINER);
      PortletInfo containerInfo = container.getInfo();
      SecurityInfo securityInfo = containerInfo.getSecurity();
      SecurityContext securityContext = invocation.getSecurityContext();
      boolean invoke = true;
      if (!securityContext.isSecure())
      {
         if (securityInfo.containsTransportGuarantee(TransportGuarantee.CONFIDENTIAL))
         {
            invoke = false;
         }
         else if (securityInfo.containsTransportGuarantee(TransportGuarantee.INTEGRAL))
         {
            invoke = false;
         }
      }
View Full Code Here

Examples of org.jboss.portal.portlet.info.SecurityInfo

   public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
   {
      PortletContainer container = (PortletContainer)invocation.getAttribute(ContainerPortletInvoker.PORTLET_CONTAINER);
      PortletInfo containerInfo = container.getInfo();
      SecurityInfo securityInfo = containerInfo.getSecurity();
      SecurityContext securityContext = invocation.getSecurityContext();
      boolean invoke = true;
      if (!securityContext.isSecure())
      {
         if (securityInfo.containsTransportGuarantee(TransportGuarantee.CONFIDENTIAL))
         {
            invoke = false;
         }
         else if (securityInfo.containsTransportGuarantee(TransportGuarantee.INTEGRAL))
         {
            invoke = false;
         }
      }
View Full Code Here

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

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

  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

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

  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

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

                    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

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

        }
    }

    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
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.