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

Examples of org.jboss.identity.federation.core.wstrust.WSTrustJAXBFactory


    private Element issueToken(RequestSecurityToken request) throws WSTrustException
    {
        request.setRequestType(URI.create(WSTrustConstants.ISSUE_REQUEST));
        request.setContext("context");
        WSTrustJAXBFactory jaxbFactory = WSTrustJAXBFactory.getInstance();
        DOMSource requestSource = (DOMSource) jaxbFactory.marshallRequestSecurityToken(request);
        Source response = dispatchLocal.get().invoke(requestSource);

        Node documentNode = ((DOMSource) response).getNode();
        Document responseDoc = documentNode instanceof Document ? (Document) documentNode : documentNode.getOwnerDocument();
View Full Code Here


        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);

        Node documentNode = ((DOMSource) response).getNode();
        Document responseDoc = documentNode instanceof Document ? (Document) documentNode : documentNode.getOwnerDocument();
View Full Code Here

        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);

        Source response = dispatchLocal.get().invoke(requestSource);
        RequestSecurityTokenResponseCollection responseCollection = (RequestSecurityTokenResponseCollection) jaxbFactory.parseRequestSecurityTokenResponse(response);
        RequestSecurityTokenResponse tokenResponse = responseCollection.getRequestSecurityTokenResponses().get(0);

        StatusType status = tokenResponse.getStatus();
        if (status != null)
        {
View Full Code Here

TOP

Related Classes of org.jboss.identity.federation.core.wstrust.WSTrustJAXBFactory

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.