oltu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r961894 - in /incubator/amber/trunk/spec-api/src/main/java/org/apache/amber: OAuthFactory.java OAuthRequest.java OAuthResponse.java OAuthServer.java server/OAuthServer.java
Date Thu, 08 Jul 2010 19:27:46 GMT
Author: simonetripodi
Date: Thu Jul  8 19:27:46 2010
New Revision: 961894

URL: http://svn.apache.org/viewvc?rev=961894&view=rev
Log:
prototyping the server interface

Added:
    incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/server/OAuthServer.java
      - copied, changed from r955922, incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthServer.java
Removed:
    incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthServer.java
Modified:
    incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthFactory.java
    incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthRequest.java
    incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthResponse.java

Modified: incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthFactory.java
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthFactory.java?rev=961894&r1=961893&r2=961894&view=diff
==============================================================================
--- incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthFactory.java (original)
+++ incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthFactory.java Thu Jul
 8 19:27:46 2010
@@ -18,6 +18,8 @@ package org.apache.amber;
 
 import java.util.Properties;
 
+import org.apache.amber.server.OAuthServer;
+
 /**
  * @version $Revision$ $Date$
  * 

Modified: incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthRequest.java
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthRequest.java?rev=961894&r1=961893&r2=961894&view=diff
==============================================================================
--- incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthRequest.java (original)
+++ incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthRequest.java Thu Jul
 8 19:27:46 2010
@@ -16,17 +16,22 @@
  */
 package org.apache.amber;
 
+import java.net.URL;
+
 /**
- * <p>
  * A convenient object representing the properties of an OAuth request to a
- * {@link org.apache.amber.OAuthProvider}
- * </p>
- * 
- * @version $Revision$ $Date$
- * 
+ * {@link org.apache.amber.OAuthProvider}.
+ *
+ * @version $Id$
  */
 public interface OAuthRequest {
 
-    //
+    URL getRequestURL();
+
+    void setRequestURL(URL requestURL);
+
+    HTTPMethod getHTTPMethod();
+
+    void setHTTPMethod(HTTPMethod httpMethod);
 
-}
\ No newline at end of file
+}

Modified: incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthResponse.java
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthResponse.java?rev=961894&r1=961893&r2=961894&view=diff
==============================================================================
--- incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthResponse.java (original)
+++ incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthResponse.java Thu Jul
 8 19:27:46 2010
@@ -17,18 +17,14 @@
 package org.apache.amber;
 
 /**
- * <p>
  * An object representing the response returned from an
- * {@link org.apache.amber.OAuthClient} or {@link org.apache.amber.OAuthServer}
- * </p>
- * 
- * @version $Revision$ $Date$
- * 
+ * {@link org.apache.amber.OAuthClient} or {@link org.apache.amber.server.OAuthServer}.
+ *
+ * @version $Id$
  * @see org.apache.amber.OAuthClient
- * 
  */
 public interface OAuthResponse {
 
     //
 
-}
\ No newline at end of file
+}

Copied: incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/server/OAuthServer.java
(from r955922, incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthServer.java)
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/server/OAuthServer.java?p2=incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/server/OAuthServer.java&p1=incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthServer.java&r1=955922&r2=961894&rev=961894&view=diff
==============================================================================
--- incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthServer.java (original)
+++ incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/server/OAuthServer.java
Thu Jul  8 19:27:46 2010
@@ -14,21 +14,57 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.amber;
+package org.apache.amber.server;
+
+import org.apache.amber.OAuthException;
+import org.apache.amber.OAuthRequest;
+import org.apache.amber.OAuthToken;
 
 /**
- * <p>
  * An OAuth Server provides the functionality required to deliver OAuth Provider
  * functionality. It can be exposed by wrapping it in an HTTP layer, e.g. that
  * provided by the Servlet Spec or perhaps directly exposed by a custom HTTP
  * server.
- * </p>
- * 
- * @version $Revision$ $Date$
- * 
+ *
+ * @version $Id$
  */
 public interface OAuthServer {
 
-    //
+    /**
+     * Generates a new request token.
+     *
+     * @param request
+     * @return
+     * @throws OAuthException
+     */
+    OAuthToken requestToken(OAuthRequest request) throws OAuthException;
+
+    /**
+     * Authorize a request token.
+     *
+     * @param oauthToken
+     * @return
+     * @throws OAuthException
+     */
+    OAuthToken authorizeToken(String oauthToken) throws OAuthException;
+
+    /**
+     * Generates a new access token.
+     *
+     * @param request
+     * @return
+     * @throws OAuthException
+     */
+    OAuthToken accessToken(OAuthRequest request) throws OAuthException;
+
+    /**
+     * Evaluates if a specific request contains authorization token to
+     * access to a protected resource.
+     *
+     * @param request
+     * @return
+     * @throws OAuthException
+     */
+    boolean canAccessToProtectedResources(OAuthRequest request) throws OAuthException;
 
 }



Mime
View raw message