oltu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asa...@apache.org
Subject svn commit: r1431333 - in /incubator/amber/trunk/oauth-2.0/client-demo/src/main: java/org/apache/amber/oauth2/client/demo/Utils.java java/org/apache/amber/oauth2/client/demo/controller/MainController.java webapp/WEB-INF/views/index.jsp
Date Thu, 10 Jan 2013 13:12:08 GMT
Author: asanso
Date: Thu Jan 10 13:12:08 2013
New Revision: 1431333

URL: http://svn.apache.org/viewvc?rev=1431333&view=rev
Log:
AMBER-58 - Add generic flow to client-demo webapp

Modified:
    incubator/amber/trunk/oauth-2.0/client-demo/src/main/java/org/apache/amber/oauth2/client/demo/Utils.java
    incubator/amber/trunk/oauth-2.0/client-demo/src/main/java/org/apache/amber/oauth2/client/demo/controller/MainController.java
    incubator/amber/trunk/oauth-2.0/client-demo/src/main/webapp/WEB-INF/views/index.jsp

Modified: incubator/amber/trunk/oauth-2.0/client-demo/src/main/java/org/apache/amber/oauth2/client/demo/Utils.java
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/oauth-2.0/client-demo/src/main/java/org/apache/amber/oauth2/client/demo/Utils.java?rev=1431333&r1=1431332&r2=1431333&view=diff
==============================================================================
--- incubator/amber/trunk/oauth-2.0/client-demo/src/main/java/org/apache/amber/oauth2/client/demo/Utils.java
(original)
+++ incubator/amber/trunk/oauth-2.0/client-demo/src/main/java/org/apache/amber/oauth2/client/demo/Utils.java
Thu Jan 10 13:12:08 2013
@@ -43,6 +43,8 @@ public final class Utils {
     public static final String REG_TYPE_PULL = "pull";
     public static final String REG_TYPE_PUSH = "push";
 
+    public static final String GENERIC = "generic"; 
+    
     public static final String FACEBOOK = "facebook";
     public static final String FACEBOOK_AUTHZ = "https://graph.facebook.com/oauth/authorize";
     public static final String FACEBOOK_TOKEN = "https://graph.facebook.com/oauth/access_token";

Modified: incubator/amber/trunk/oauth-2.0/client-demo/src/main/java/org/apache/amber/oauth2/client/demo/controller/MainController.java
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/oauth-2.0/client-demo/src/main/java/org/apache/amber/oauth2/client/demo/controller/MainController.java?rev=1431333&r1=1431332&r2=1431333&view=diff
==============================================================================
--- incubator/amber/trunk/oauth-2.0/client-demo/src/main/java/org/apache/amber/oauth2/client/demo/controller/MainController.java
(original)
+++ incubator/amber/trunk/oauth-2.0/client-demo/src/main/java/org/apache/amber/oauth2/client/demo/controller/MainController.java
Thu Jan 10 13:12:08 2013
@@ -62,7 +62,9 @@ public class MainController {
         throws OAuthSystemException, IOException {
 
         boolean selected = false;
-        if (Utils.GITHUB.equals(app)) {
+        if (Utils.GENERIC.equals(app)) {
+            selected = true;
+        }else if (Utils.GITHUB.equals(app)) {
             selected = true;
             oauthParams.setAuthzEndpoint(Utils.GITHUB_AUTHZ);
             oauthParams.setTokenEndpoint(Utils.GITHUB_TOKEN);

Modified: incubator/amber/trunk/oauth-2.0/client-demo/src/main/webapp/WEB-INF/views/index.jsp
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/oauth-2.0/client-demo/src/main/webapp/WEB-INF/views/index.jsp?rev=1431333&r1=1431332&r2=1431333&view=diff
==============================================================================
--- incubator/amber/trunk/oauth-2.0/client-demo/src/main/webapp/WEB-INF/views/index.jsp (original)
+++ incubator/amber/trunk/oauth-2.0/client-demo/src/main/webapp/WEB-INF/views/index.jsp Thu
Jan 10 13:12:08 2013
@@ -38,6 +38,7 @@
 
 <h3>Choose Application</h3>
 
+<a href="/main/generic">Generic OAuth2 Application</a> 
 <a href="/main/smart_gallery">Smart Gallery</a>
 <a href="/main/facebook">Facebook</a>
 <a href="/main/google">Google</a>



Mime
View raw message