Examples of RenewTargetType


Examples of org.picketlink.identity.federation.ws.trust.RenewTargetType

        RequestSecurityToken requestToken = (RequestSecurityToken) parser.parse(configStream);
        assertEquals("renewcontext", requestToken.getContext());
        assertEquals(WSTrustConstants.RENEW_REQUEST, requestToken.getRequestType().toASCIIString());
        assertEquals(SAMLUtil.SAML2_TOKEN_TYPE, requestToken.getTokenType().toASCIIString());

        RenewTargetType renewTarget = requestToken.getRenewTarget();
        Element assertionElement = (Element) renewTarget.getAny().get(0);
        AssertionType assertion = SAMLUtil.fromElement(assertionElement);
        assertEquals("ID_654b6092-c725-40ea-8044-de453b59cb28", assertion.getID());
        assertEquals("Test STS", assertion.getIssuer().getValue());
        SubjectType subject = assertion.getSubject();
        assertEquals("jduke", ((NameIDType) subject.getSubType().getBaseID()).getValue());
View Full Code Here

Examples of org.picketlink.identity.federation.ws.trust.RenewTargetType

        Element assertionElement = (Element) collection.getRequestSecurityTokenResponses().get(0).getRequestedSecurityToken()
                .getAny().get(0);

        // now construct a WS-Trust renew request with the generated assertion.
        request = this.createRequest("renewcontext", WSTrustConstants.RENEW_REQUEST, SAMLUtil.SAML11_TOKEN_TYPE, null);
        RenewTargetType renewTarget = new RenewTargetType();
        renewTarget.add(assertionElement);
        request.setRenewTarget(renewTarget);

        // invoke the token service.
        responseMessage = this.tokenService.invoke(this.createSourceFromRequest(request));
        baseResponse = (BaseRequestSecurityTokenResponse) parser.parse(DocumentUtil.getSourceAsStream(responseMessage));
View Full Code Here

Examples of org.picketlink.identity.federation.ws.trust.RenewTargetType

        Element assertionElement = (Element) collection.getRequestSecurityTokenResponses().get(0).getRequestedSecurityToken()
                .getAny().get(0);

        // now construct a WS-Trust renew request with the generated assertion.
        request = this.createRequest("renewcontext", WSTrustConstants.RENEW_REQUEST, SAMLUtil.SAML2_TOKEN_TYPE, null);
        RenewTargetType renewTarget = new RenewTargetType();
        renewTarget.add(assertionElement);
        request.setRenewTarget(renewTarget);

        // invoke the token service.
        responseMessage = this.tokenService.invoke(this.createSourceFromRequest(request));
        baseResponse = (BaseRequestSecurityTokenResponse) parser.parse(DocumentUtil.getSourceAsStream(responseMessage));
View Full Code Here

Examples of org.picketlink.identity.federation.ws.trust.RenewTargetType

                "Validation failure: assertion with id " + assertion.getAttribute("AssertionID") + " has been canceled",
                status.getReason());

        // now try to renew the canceled assertion.
        request = this.createRequest("renewcontext", WSTrustConstants.RENEW_REQUEST, null, null);
        RenewTargetType renewTarget = new RenewTargetType();
        renewTarget.add(assertion);
        request.setRenewTarget(renewTarget);

        // we should receive an exception when renewing the token.
        try {
            this.tokenService.invoke(this.createSourceFromRequest(request));
View Full Code Here

Examples of org.picketlink.identity.federation.ws.trust.RenewTargetType

        assertEquals("Unexpected status reason", "Validation failure: assertion with id " + assertion.getAttribute("ID")
                + " has been canceled", status.getReason());

        // now try to renew the canceled assertion.
        request = this.createRequest("renewcontext", WSTrustConstants.RENEW_REQUEST, null, null);
        RenewTargetType renewTarget = new RenewTargetType();
        renewTarget.add(assertion);
        request.setRenewTarget(renewTarget);

        // we should receive an exception when renewing the token.
        try {
            this.tokenService.invoke(this.createSourceFromRequest(request));
View Full Code Here

Examples of org.picketlink.identity.federation.ws.trust.RenewTargetType

            if (msg.contains("PL00092: Null Value:renew target") == false)
                throw new RuntimeException("Unexpected exception message");
        }

        // a request with an empty renew target should also result in a failure.
        request.setRenewTarget(new RenewTargetType());
        requestMessage = this.createSourceFromRequest(request);
        try {
            this.tokenService.invoke(requestMessage);
            fail("An exception should have been raised by the security token service");
        } catch (WebServiceException we) {
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.