Package org.apache.ws.security.util

Examples of org.apache.ws.security.util.XmlSchemaDateFormat.format()


            // Add the Lifetime element
            TrustUtil.createLifetimeElement(wstVersion,
                                            rstrElem,
                                            zulu.format(creationTime),
                                            zulu.format(expirationTime));

            // Store the tokens
            Token sctToken = new Token(sct.getIdentifier(),
                                       (OMElement) sct.getElement(),
                                       creationTime,
View Full Code Here


            // Use GMT time in milliseconds
            DateFormat zulu = new XmlSchemaDateFormat();

            // Add the Lifetime element
            TrustUtil.createLifetimeElement(wstVersion, rstrElem, zulu
                    .format(creationTime), zulu.format(expirationTime));

            // Create the RequestedSecurityToken element and add the SAML token
            // to it
            OMElement reqSecTokenElem = TrustUtil
View Full Code Here

            // Use GMT time in milliseconds
            DateFormat zulu = new XmlSchemaDateFormat();

            // Add the Lifetime element
            TrustUtil.createLifetimeElement(wstVersion, rstrElem, zulu
                    .format(creationTime), zulu.format(expirationTime));

            // Create the RequestedSecurityToken element and add the SAML token
            // to it
            OMElement reqSecTokenElem = TrustUtil
                    .createRequestedSecurityTokenElement(wstVersion, rstrElem);
View Full Code Here

        if (bspCompliant) {
            zulu.setLenient(false);
        }
        try {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Current time: " + zulu.format(new Date()));
            }
            if (strCreated != null) {
                createdDate = zulu.parse(strCreated);
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Timestamp created: " + zulu.format(createdDate));
View Full Code Here

                LOG.debug("Current time: " + zulu.format(new Date()));
            }
            if (strCreated != null) {
                createdDate = zulu.parse(strCreated);
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Timestamp created: " + zulu.format(createdDate));
                }
            }
            if (strExpires != null) {
                expiresDate = zulu.parse(strExpires);
                if (LOG.isDebugEnabled()) {
View Full Code Here

                }
            }
            if (strExpires != null) {
                expiresDate = zulu.parse(strExpires);
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Timestamp expires: " + zulu.format(expiresDate));
                }
            }
        } catch (ParseException e) {
            throw new WSSecurityException(
                WSSecurityException.INVALID_SECURITY, "invalidTimestamp", null, e
View Full Code Here

        if (log.isDebugEnabled()) {
            log.debug("Preparing to verify the timestamp");

            DateFormat zulu = new XmlSchemaDateFormat();

            log.debug("Current time: " + zulu.format(Calendar.getInstance().getTime()));
            if (timestamp.getCreated() != null) {
                log.debug("Timestamp created: " + zulu.format(timestamp.getCreated().getTime()));
            }
            if (timestamp.getExpires() != null) {
                log.debug("Timestamp expires: " + zulu.format(timestamp.getExpires().getTime()));
View Full Code Here

            DateFormat zulu = new XmlSchemaDateFormat();

            log.debug("Current time: " + zulu.format(Calendar.getInstance().getTime()));
            if (timestamp.getCreated() != null) {
                log.debug("Timestamp created: " + zulu.format(timestamp.getCreated().getTime()));
            }
            if (timestamp.getExpires() != null) {
                log.debug("Timestamp expires: " + zulu.format(timestamp.getExpires().getTime()));
            }
        }
View Full Code Here

            log.debug("Current time: " + zulu.format(Calendar.getInstance().getTime()));
            if (timestamp.getCreated() != null) {
                log.debug("Timestamp created: " + zulu.format(timestamp.getCreated().getTime()));
            }
            if (timestamp.getExpires() != null) {
                log.debug("Timestamp expires: " + zulu.format(timestamp.getExpires().getTime()));
            }
        }

        // Validate whether the security semantics have expired
        Calendar exp = timestamp.getExpires();
View Full Code Here

        }
       
        // Test for replay attacks
        Date created = timeStamp.getCreated();
        DateFormat zulu = new XmlSchemaDateFormat();
        String identifier = zulu.format(created) + "" + Arrays.hashCode(signatureValue);

        if (replayCache.contains(identifier)) {
            throw new WSSecurityException(
                WSSecurityException.INVALID_SECURITY,
                "invalidTimestamp",
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.