Package org.jboss.ws.extensions.security.element

Examples of org.jboss.ws.extensions.security.element.Timestamp


   }

   private void decode() throws WSSecurityException
   {
      // Validate a timestamp if it is present
      Timestamp timestamp = header.getTimestamp();

      if (timestamp != null)
      {
         TimestampVerificationOperation operation = (now == null) ? new TimestampVerificationOperation(timestampVerification) : new TimestampVerificationOperation(now);
         operation.process(message, timestamp);
View Full Code Here


      catch (NumberFormatException e)
      {
         // Eat
      }

      header.setTimestamp(new Timestamp(ttl, message));
   }
View Full Code Here


   private void decode() throws WSSecurityException
   {
      // Validate a timestamp if it is present
      Timestamp timestamp = header.getTimestamp();

      if (timestamp != null)
      {
         TimestampVerificationOperation operation =
            (now == null) ? new TimestampVerificationOperation() : new TimestampVerificationOperation(now);
View Full Code Here

      this.header = header;
   }

   public void process(Document message, List<Target> targets, String maxAge, String credential, Collection<String> processedIds) throws WSSecurityException
   {
      Timestamp stamp = header.getTimestamp();
      if (stamp == null)
         throw new FailedCheckException("Required timestamp not present.");

      // If there is no maxAge specified then we are done
      if (maxAge == null)
         return;

      int max = Integer.parseInt(maxAge);

      Calendar expired = (Calendar)stamp.getCreated().clone();
      expired.add(Calendar.SECOND, max);

      if (! Calendar.getInstance().before(expired))
         throw new FailedCheckException("Timestamp of message is too old.");
   }
View Full Code Here


   private void decode() throws WSSecurityException
   {
      // Validate a timestamp if it is present
      Timestamp timestamp = header.getTimestamp();

      if (timestamp != null)
      {
         TimestampVerificationOperation operation =
            (now == null) ? new TimestampVerificationOperation(timestampVerification) : new TimestampVerificationOperation(now);
View Full Code Here

      catch (NumberFormatException e)
      {
         // Eat
      }

      header.setTimestamp(new Timestamp(ttl, message));
   }
View Full Code Here

   }

   private void decode() throws WSSecurityException
   {
      // Validate a timestamp if it is present
      Timestamp timestamp = header.getTimestamp();

      if (timestamp != null)
      {
         TimestampVerificationOperation operation = (now == null) ? new TimestampVerificationOperation(timestampVerification) : new TimestampVerificationOperation(now);
         operation.process(message, timestamp);
View Full Code Here


   private void decode() throws WSSecurityException
   {
      // Validate a timestamp if it is present
      Timestamp timestamp = header.getTimestamp();

      if (timestamp != null)
      {
         TimestampVerificationOperation operation =
            (now == null) ? new TimestampVerificationOperation(timestampVerification) : new TimestampVerificationOperation(now);
View Full Code Here

      this.maxAge = maxAge;
   }
  
   public void process(Document message, SecurityHeader header, Collection<String> processedIds) throws WSSecurityException
   {
      Timestamp stamp = header.getTimestamp();
      if (stamp == null)
         throw new FailedCheckException("Required timestamp not present.");

      // If there is no maxAge specified then we are done
      if (maxAge == null)
         return;

      int max = Integer.parseInt(maxAge);

      Calendar expired = (Calendar)stamp.getCreated().clone();
      expired.add(Calendar.SECOND, max);

      if (! Calendar.getInstance().before(expired))
         throw new FailedCheckException("Timestamp of message is too old.");
   }
View Full Code Here

      }
   }

   public void process(Document message, SecurityHeader header, SecurityStore store) throws WSSecurityException
   {
      header.setTimestamp(new Timestamp(ttl, message));
   }
View Full Code Here

TOP

Related Classes of org.jboss.ws.extensions.security.element.Timestamp

Copyright © 2018 www.massapicom. 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.