Package org.apache.ws.security.util

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


                }
            }
            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


            );
        DateFormat zulu = new XmlSchemaDateFormat();
        Date createdDate = new Date();
        long currentTime = createdDate.getTime() + 30000;
        createdDate.setTime(currentTime);
        elementCreated.appendChild(doc.createTextNode(zulu.format(createdDate)));
        usernameTokenElement.appendChild(elementCreated);

        secHeader.getSecurityHeader().appendChild(usernameTokenElement);
       
        if (LOG.isDebugEnabled()) {
View Full Code Here

            );
        DateFormat zulu = new XmlSchemaDateFormat();
        Date createdDate = new Date();
        long currentTime = createdDate.getTime() + 120000;
        createdDate.setTime(currentTime);
        elementCreated.appendChild(doc.createTextNode(zulu.format(createdDate)));
        usernameTokenElement.appendChild(elementCreated);

        secHeader.getSecurityHeader().appendChild(usernameTokenElement);
       
        if (LOG.isDebugEnabled()) {
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,
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,
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 (doDebug) {
      log.debug("Preparing to verify the timestamp");
      DateFormat zulu = new XmlSchemaDateFormat();
      log.debug("Validation of Timestamp: Current time is "
          + zulu.format(Calendar.getInstance().getTime()));
      log.debug("Validation of Timestamp: Valid creation is "
          + zulu.format(validCreation.getTime()));
      if (timestamp.getCreated() != null) {
        log.debug("Validation of Timestamp: Timestamp created is "
            + zulu.format(timestamp.getCreated().getTime()));
View Full Code Here

      log.debug("Preparing to verify the timestamp");
      DateFormat zulu = new XmlSchemaDateFormat();
      log.debug("Validation of Timestamp: Current time is "
          + zulu.format(Calendar.getInstance().getTime()));
      log.debug("Validation of Timestamp: Valid creation is "
          + zulu.format(validCreation.getTime()));
      if (timestamp.getCreated() != null) {
        log.debug("Validation of Timestamp: Timestamp created is "
            + zulu.format(timestamp.getCreated().getTime()));
      }
    }
View Full Code Here

          + zulu.format(Calendar.getInstance().getTime()));
      log.debug("Validation of Timestamp: Valid creation is "
          + zulu.format(validCreation.getTime()));
      if (timestamp.getCreated() != null) {
        log.debug("Validation of Timestamp: Timestamp created is "
            + zulu.format(timestamp.getCreated().getTime()));
      }
    }
        // Validate the time it took the message to travel
        // if (timestamp.getCreated().before(validCreation) ||
        // !timestamp.getCreated().equals(validCreation)) {
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.