Package org.apache.ws.security.util

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


        writer.writeStartElement("wsu", "Created", WSConstants.WSU_NS);
        writer.writeCharacters(fmt.format(creationTime));
        writer.writeEndElement();

        writer.writeStartElement("wsu", "Expires", WSConstants.WSU_NS);
        writer.writeCharacters(fmt.format(expirationTime));
        writer.writeEndElement();
        writer.writeEndElement();
    }

    private void addAppliesTo(XMLStreamWriter writer, String appliesTo) throws XMLStreamException {
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

        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

        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

      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) {
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()));
      }
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.