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

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


      }
   }

   public void process(Document message, SecurityHeader header, SecurityStore store) throws WSSecurityException
   {
      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.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


   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)
/*    */     {
/*    */     }
/*    */
/* 56 */     this.header.setTimestamp(new Timestamp(ttl, message));
/*    */   }
View Full Code Here

/* 39 */     this.header = header;
/*    */   }
/*    */
/*    */   public void process(Document message, List<Target> targets, String maxAge, String credential, Collection<String> processedIds) throws WSSecurityException
/*    */   {
/* 44 */     Timestamp stamp = this.header.getTimestamp();
/* 45 */     if (stamp == null) {
/* 46 */       throw new FailedCheckException("Required timestamp not present.");
/*    */     }
/*    */
/* 49 */     if (maxAge == null) {
/* 50 */       return;
/*    */     }
/* 52 */     int max = Integer.parseInt(maxAge);
/*    */
/* 54 */     Calendar expired = (Calendar)stamp.getCreated().clone();
/* 55 */     expired.add(13, max);
/*    */
/* 57 */     if (!Calendar.getInstance().before(expired))
/* 58 */       throw new FailedCheckException("Timestamp of message is too old.");
/*    */   }
View Full Code Here

/*     */   }
/*     */
/*     */   private void decode()
/*     */     throws WSSecurityException
/*     */   {
/*  97 */     Timestamp timestamp = this.header.getTimestamp();
/*     */
/*  99 */     if (timestamp != null)
/*     */     {
/* 101 */       TimestampVerificationOperation operation = this.now == null ? new TimestampVerificationOperation() : new TimestampVerificationOperation(this.now);
/*     */
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

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.