oltu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r961912 - /incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthParameter.java
Date Thu, 08 Jul 2010 20:03:11 GMT
Author: simonetripodi
Date: Thu Jul  8 20:03:10 2010
New Revision: 961912

URL: http://svn.apache.org/viewvc?rev=961912&view=rev
Log:
adding metadata to OAuthParameter, such if it is optional or if it is required in the base
string calculation

Modified:
    incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthParameter.java

Modified: incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthParameter.java
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthParameter.java?rev=961912&r1=961911&r2=961912&view=diff
==============================================================================
--- incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthParameter.java (original)
+++ incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthParameter.java Thu
Jul  8 20:03:10 2010
@@ -71,7 +71,7 @@ public enum OAuthParameter {
      *
      * Value: {@code oauth_timestamp}.
      */
-    TIMESTAMP("oauth_timestamp"),
+    TIMESTAMP("oauth_timestamp", true, false),
 
     /**
      * The token parameter name.
@@ -105,18 +105,36 @@ public enum OAuthParameter {
      *
      * @see org.apache.amber.Version
      */
-    VERSION("oauth_version");
+    VERSION("oauth_version", false, false);
 
     private final String label;
 
+    private final boolean optional;
+
+    private final boolean includeInSignature;
+
     private OAuthParameter(String label) {
+        this(label, false, true);
+    }
+
+    private OAuthParameter(String label, boolean optional, boolean includeInSignature) {
         this.label = label;
+        this.optional = optional;
+        this.includeInSignature = includeInSignature;
     }
 
     public String getLabel() {
         return this.label;
     }
 
+    public boolean isOptional() {
+        return this.optional;
+    }
+
+    public boolean isIncludeInSignature() {
+        return this.includeInSignature;
+    }
+
     @Override
     public String toString() {
         return this.label;



Mime
View raw message