Package org.jboss.identity.federation.core.wstrust.wrappers

Examples of org.jboss.identity.federation.core.wstrust.wrappers.RequestSecurityToken


        
         jaxbRST = (JAXBElement<RequestSecurityTokenType>) binder.unmarshal(rst);

         RequestSecurityTokenType rstt = jaxbRST.getValue();
         holders.set(new SAMLDocumentHolder(rstt, document));
         return new RequestSecurityToken(rstt);
      }
      catch (JAXBException e)
      {
         throw new ParsingException(e);
      }
View Full Code Here


    }

    public boolean validateToken(Element token) throws WSTrustException
    {
        RequestSecurityToken request = new RequestSecurityToken();
        request.setContext("context");

        request.setTokenType(URI.create(WSTrustConstants.STATUS_TYPE));
        request.setRequestType(URI.create(WSTrustConstants.VALIDATE_REQUEST));
        ValidateTargetType validateTarget = new ValidateTargetType();
        validateTarget.setAny(token);
        request.setValidateTarget(validateTarget);

        WSTrustJAXBFactory jaxbFactory = WSTrustJAXBFactory.getInstance();

        DOMSource requestSource = (DOMSource) jaxbFactory.marshallRequestSecurityToken(request);
View Full Code Here

     *                  for the endpointURI passed in.
     * @throws WSTrustException
     */
    public Element issueTokenForEndpoint(String endpointURI) throws WSTrustException
    {
        RequestSecurityToken request = new RequestSecurityToken();
        setAppliesTo(endpointURI, request);
        return issueToken(request);
    }
View Full Code Here

    public Element issueToken(String endpointURI, String tokenType) throws WSTrustException
    {
        if (endpointURI == null && tokenType == null)
            throw new IllegalArgumentException("One of endpointURI or tokenType must be provided.");
       
        RequestSecurityToken request = new RequestSecurityToken();
        setAppliesTo(endpointURI, request);
        setTokenType(tokenType, request);
        return issueToken(request);
    }
View Full Code Here

    }
   
    public Element issueToken(String tokenType) throws WSTrustException
    {
        // create a custom token request message.
        RequestSecurityToken request = new RequestSecurityToken();
        setTokenType(tokenType, request);
        // send the token request to JBoss STS and get the response.
        return issueToken(request);
    }
View Full Code Here

        return (Element) rstr.getFirstChild();
    }

    public Element renewToken(String tokenType, Element token) throws WSTrustException
    {
        RequestSecurityToken request = new RequestSecurityToken();
        request.setContext("context");

        request.setTokenType(URI.create(WSTrustConstants.STATUS_TYPE));
        request.setRequestType(URI.create(WSTrustConstants.RENEW_REQUEST));
        RenewTargetType renewTarget = new RenewTargetType();
        renewTarget.setAny(token);
        request.setRenewTarget(renewTarget);

        // send the token request to JBoss STS and get the response.
        WSTrustJAXBFactory jaxbFactory = WSTrustJAXBFactory.getInstance();
        DOMSource requestSource = (DOMSource) jaxbFactory.marshallRequestSecurityToken(request);
        Source response = dispatchLocal.get().invoke(requestSource);
View Full Code Here

        
         jaxbRST = (JAXBElement<RequestSecurityTokenType>) binder.unmarshal(rst);

         RequestSecurityTokenType rstt = jaxbRST.getValue();
         holders.set(new SAMLDocumentHolder(rstt, document));
         return new RequestSecurityToken(rstt);
      }
      catch (JAXBException e)
      {
         throw new ParsingException(e);
      }
View Full Code Here

TOP

Related Classes of org.jboss.identity.federation.core.wstrust.wrappers.RequestSecurityToken

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.