Examples of BaseRequestSecurityTokenResponse


Examples of org.picketlink.identity.federation.core.wstrust.wrappers.BaseRequestSecurityTokenResponse

                "http://www.tokens.org/SpecialToken", null);
        Source requestMessage = this.createSourceFromRequest(request);

        // invoke the token service.
        Source responseMessage = this.tokenService.invoke(requestMessage);
        BaseRequestSecurityTokenResponse baseResponse = (BaseRequestSecurityTokenResponse) new WSTrustParser()
                .parse(DocumentUtil.getSourceAsStream(responseMessage));
        // validate the security token response.
        this.validateCustomTokenResponse(baseResponse);
    }
View Full Code Here

Examples of org.picketlink.identity.federation.core.wstrust.wrappers.BaseRequestSecurityTokenResponse

        Source requestMessage = this.createSourceFromRequest(request);

        // invoke the token service.
        Source responseMessage = this.tokenService.invoke(requestMessage);
        InputStream is = DocumentUtil.getSourceAsStream(responseMessage);
        BaseRequestSecurityTokenResponse baseResponse = (BaseRequestSecurityTokenResponse) new WSTrustParser().parse(is);
        // validate the security token response.
        this.validateSAML11AssertionResponse(baseResponse, "testcontext", "jduke", SAMLUtil.SAML11_BEARER_URI);
    }
View Full Code Here

Examples of org.picketlink.identity.federation.core.wstrust.wrappers.BaseRequestSecurityTokenResponse

        Source requestMessage = this.createSourceFromRequest(request);

        // invoke the token service.
        Source responseMessage = this.tokenService.invoke(requestMessage);
        InputStream is = DocumentUtil.getSourceAsStream(responseMessage);
        BaseRequestSecurityTokenResponse baseResponse = (BaseRequestSecurityTokenResponse) new WSTrustParser().parse(is);
        // validate the security token response.
        this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke", SAMLUtil.SAML2_BEARER_URI);
    }
View Full Code Here

Examples of org.picketlink.identity.federation.core.wstrust.wrappers.BaseRequestSecurityTokenResponse

        this.tokenService.setSoap12(true); // Set to SOAP12
        try {
            // invoke the token service.
            Source responseMessage = this.tokenService.invoke(requestMessage);
            InputStream is = DocumentUtil.getSourceAsStream(responseMessage);
            BaseRequestSecurityTokenResponse baseResponse = (BaseRequestSecurityTokenResponse) new WSTrustParser().parse(is);
            // validate the security token response.
            this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke", SAMLUtil.SAML2_BEARER_URI);
        } finally {
            this.tokenService.setSoap12(false);
        }
View Full Code Here

Examples of org.picketlink.identity.federation.core.wstrust.wrappers.BaseRequestSecurityTokenResponse

                "http://services.testcorp.org/provider1");
        Source requestMessage = this.createSourceFromRequest(request);

        // invoke the token service.
        Source responseMessage = this.tokenService.invoke(requestMessage);
        BaseRequestSecurityTokenResponse baseResponse = (BaseRequestSecurityTokenResponse) new WSTrustParser()
                .parse(DocumentUtil.getSourceAsStream(responseMessage));

        // validate the security token response.
        this.validateCustomTokenResponse(baseResponse);
    }
View Full Code Here

Examples of org.picketlink.identity.federation.core.wstrust.wrappers.BaseRequestSecurityTokenResponse

                "http://services.testcorp.org/provider2");
        Source requestMessage = this.createSourceFromRequest(request);

        // invoke the token service.
        Source responseMessage = this.tokenService.invoke(requestMessage);
        BaseRequestSecurityTokenResponse baseResponse = (BaseRequestSecurityTokenResponse) new WSTrustParser()
                .parse(DocumentUtil.getSourceAsStream(responseMessage));

        // validate the security token response.
        AssertionType assertion = this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke",
                SAMLUtil.SAML2_BEARER_URI);
View Full Code Here

Examples of org.picketlink.identity.federation.core.wstrust.wrappers.BaseRequestSecurityTokenResponse

        Source requestMessage = this.createSourceFromRequest(request);

        // invoke the token service.
        Source responseMessage = this.tokenService.invoke(requestMessage);
        BaseRequestSecurityTokenResponse baseResponse = (BaseRequestSecurityTokenResponse) new WSTrustParser()
                .parse(DocumentUtil.getSourceAsStream(responseMessage));

        // validate the security token response (assertion principal should be anotherduke as specified by OnBehalfOf).
        this.validateSAMLAssertionResponse(baseResponse, "testcontext", "anotherduke", SAMLUtil.SAML2_SENDER_VOUCHES_URI);
    }
View Full Code Here

Examples of org.picketlink.identity.federation.core.wstrust.wrappers.BaseRequestSecurityTokenResponse

        request.setKeyType(URI.create(WSTrustConstants.KEY_TYPE_SYMMETRIC));
        Source requestMessage = this.createSourceFromRequest(request);

        // invoke the token service.
        Source responseMessage = this.tokenService.invoke(requestMessage);
        BaseRequestSecurityTokenResponse baseResponse = (BaseRequestSecurityTokenResponse) new WSTrustParser()
                .parse(DocumentUtil.getSourceAsStream(responseMessage));

        // validate the security token response.
        AssertionType assertion = this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke",
                SAMLUtil.SAML2_HOLDER_OF_KEY_URI);
View Full Code Here

Examples of org.picketlink.identity.federation.core.wstrust.wrappers.BaseRequestSecurityTokenResponse

        request.setKeySize(64);

        // invoke the token service.
        Source requestMessage = this.createSourceFromRequest(request);
        Source responseMessage = this.tokenService.invoke(requestMessage);
        BaseRequestSecurityTokenResponse baseResponse = (BaseRequestSecurityTokenResponse) new WSTrustParser()
                .parse(DocumentUtil.getSourceAsStream(responseMessage));

        // validate the security token response.
        AssertionType assertion = this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke",
                SAMLUtil.SAML2_HOLDER_OF_KEY_URI);
View Full Code Here

Examples of org.picketlink.identity.federation.core.wstrust.wrappers.BaseRequestSecurityTokenResponse

        request.setUseKey(useKey);

        // invoke the token service.
        Source requestMessage = this.createSourceFromRequest(request);
        Source responseMessage = this.tokenService.invoke(requestMessage);
        BaseRequestSecurityTokenResponse baseResponse = (BaseRequestSecurityTokenResponse) new WSTrustParser()
                .parse(DocumentUtil.getSourceAsStream(responseMessage));
        // validate the security token response.
        AssertionType assertion = this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke",
                SAMLUtil.SAML2_HOLDER_OF_KEY_URI);
        // validate the holder of key contents.
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.