Author: werner
Date: Thu Nov 17 06:21:55 2005
New Revision: 345247

URL: http://svn.apache.org/viewcvs?rev=345247&view=rev
Log:
Some fixes to make timestamp handling more compliant

to WSS specification (optional fields, exeption only

if timestampStrict=true)

Modified:
    webservices/wss4j/trunk/src/org/apache/ws/security/WSSConfig.java

Modified: webservices/wss4j/trunk/src/org/apache/ws/security/WSSConfig.java
URL: 
http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/WSSConfig.java?rev=345247&r1=345246&r2=345247&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/WSSConfig.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/WSSConfig.java Thu Nov 
17 06:21:55 2005
@@ -62,6 +62,16 @@
 
     protected boolean enableSignatureConfirmation = true;
     
+    /**
+     * If set to true then the timestamp handling will throw an
+     * expcetion if the timestamp contains an expires element and
+     * the semantics are expired.
+     * 
+     * If set to false, not expetion will be thrown, even if the
+     * semantics are expired. 
+     */
+    protected boolean timeStampStrict = true;
+    
     protected HashMap jceProvider = new HashMap(10);
     protected String jceProviderId = null;
     
@@ -150,11 +160,28 @@
     }
 
     /**
-     * Lookup action
-     * @param action
-     * @return
-     * @throws WSSecurityException
-     */
+        * @return Returns if we shall throw an exception on expired request
+        *         semantic
+        */
+       public boolean isTimeStampStrict() {
+               return timeStampStrict;
+       }
+
+       /**
+        * @param timeStampStrict
+        *            If true throw an exception on expired request semantic
+        */
+       public void setTimeStampStrict(boolean timeStampStrict) {
+               this.timeStampStrict = timeStampStrict;
+       }
+
+       /**
+        * Lookup action
+        * 
+        * @param action
+        * @return
+        * @throws WSSecurityException
+        */
     public Action getAction(int action) throws WSSecurityException {
         String name = null;
         switch(action) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to