Examples of RenewingType


Examples of org.apache.cxf.ws.security.sts.provider.model.RenewingType

            ClaimsType claimsType = (ClaimsType)jaxbElement.getValue();
            RequestClaimCollection requestedClaims = parseClaims(claimsType, claimsParsers);
            tokenRequirements.setClaims(requestedClaims);
            LOG.fine("Found Claims token");
        } else if (QNameConstants.RENEWING.equals(jaxbElement.getName())) {
            RenewingType renewingType = (RenewingType)jaxbElement.getValue();
            Renewing renewing = new Renewing();
            if (renewingType.isAllow() != null) {
                renewing.setAllowRenewing(renewingType.isAllow());
            }
            if (renewingType.isOK() != null) {
                renewing.setAllowRenewingAfterExpiry(renewingType.isOK());
            }
            tokenRequirements.setRenewing(renewing);
            LOG.fine("Found Renewing token");
        } else {
            return false;
View Full Code Here

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

    }
   


    public static RenewingType parseRenewingType(XMLEventReader xmlEventReader) throws ParsingException {
        RenewingType renewingType = new RenewingType();

        StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
        StaxParserUtil.validate(startElement, WSTrustConstants.RENEWING);

        Attribute allowAttribute = startElement.getAttributeByName(new QName(WSTrustConstants.ALLOW));
        if (allowAttribute != null) {
            renewingType.setAllow(Boolean.parseBoolean(StaxParserUtil.getAttributeValue(allowAttribute)));
        }

        Attribute okAttribute = startElement.getAttributeByName(new QName(WSTrustConstants.OK));
        if (allowAttribute != null) {
            renewingType.setOK(Boolean.parseBoolean(StaxParserUtil.getAttributeValue(okAttribute)));
        }

        EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
        StaxParserUtil.validate(endElement, WSTrustConstants.RENEWING);
        return renewingType;
View Full Code Here

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

                    WSTrustConstants.BASE_NAMESPACE);
            StaxUtil.writeEndElement(this.writer);
        }

        if (response.getRenewing() != null) {
            RenewingType renewingType = response.getRenewing();
            StaxUtil.writeStartElement(this.writer, WSTrustConstants.PREFIX, WSTrustConstants.RENEWING,
                    WSTrustConstants.BASE_NAMESPACE);

            StaxUtil.writeAttribute(this.writer, WSTrustConstants.ALLOW, "" + renewingType.isAllow());
            StaxUtil.writeAttribute(this.writer, WSTrustConstants.OK, "" + renewingType.isOK());
            StaxUtil.writeEndElement(this.writer);
        }

        // write the response end element.
        StaxUtil.writeEndElement(this.writer);
View Full Code Here

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

        assertEquals("testcontext", requestToken.getContext());
        assertEquals(WSTrustConstants.ISSUE_REQUEST, requestToken.getRequestType().toASCIIString());
        assertEquals(SAMLUtil.SAML2_TOKEN_TYPE, requestToken.getTokenType().toASCIIString());
       
        RenewingType renewingType = requestToken.getRenewing();
        assertNotNull(renewingType);
        assertTrue(renewingType.isAllow());
        assertFalse(renewingType.isOK());
       
        // Now for the writing part
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        WSTrustRequestWriter rstWriter = new WSTrustRequestWriter(baos);
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.