oltu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asa...@apache.org
Subject svn commit: r1475746 - in /oltu/trunk/demos/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller: MainController.java TokenController.java
Date Thu, 25 Apr 2013 13:11:13 GMT
Author: asanso
Date: Thu Apr 25 13:11:13 2013
New Revision: 1475746

URL: http://svn.apache.org/r1475746
Log:
OLTU-96 - Improve client API in order to support known Provider

Modified:
    oltu/trunk/demos/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/MainController.java
    oltu/trunk/demos/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/TokenController.java

Modified: oltu/trunk/demos/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/MainController.java
URL: http://svn.apache.org/viewvc/oltu/trunk/demos/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/MainController.java?rev=1475746&r1=1475745&r2=1475746&view=diff
==============================================================================
--- oltu/trunk/demos/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/MainController.java
(original)
+++ oltu/trunk/demos/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/MainController.java
Thu Apr 25 13:11:13 2013
@@ -63,7 +63,7 @@ public class MainController {
         throws OAuthSystemException, IOException {
 
         boolean selected = false;
-        if (Utils.GENERIC.equals(app)) {
+        if (Utils.GENERIC.equalsIgnoreCase(app)) {
             selected = true;
         }else if (Utils.GITHUB.equalsIgnoreCase(app)) {
             selected = true;
@@ -82,7 +82,7 @@ public class MainController {
             selected = true;
             oauthParams.setAuthzEndpoint(Utils.LINKEDIN_AUTHZ);
             oauthParams.setTokenEndpoint(Utils.LINKEDIN_TOKEN);
-        } else if (Utils.SMART_GALLERY.equals(app)) {
+        } else if (Utils.SMART_GALLERY.equalsIgnoreCase(app)) {
             selected = true;
             oauthRegParams.setAuthzEndpoint(Utils.SMART_GALLERY_AUTHZ);
             oauthRegParams.setTokenEndpoint(Utils.SMART_GALLERY_TOKEN);

Modified: oltu/trunk/demos/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/TokenController.java
URL: http://svn.apache.org/viewvc/oltu/trunk/demos/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/TokenController.java?rev=1475746&r1=1475745&r2=1475746&view=diff
==============================================================================
--- oltu/trunk/demos/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/TokenController.java
(original)
+++ oltu/trunk/demos/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/TokenController.java
Thu Apr 25 13:11:13 2013
@@ -77,11 +77,11 @@ public class TokenController {
             OAuthAccessTokenResponse oauthResponse = null;
             Class<? extends OAuthAccessTokenResponse> cl = OAuthJSONAccessTokenResponse.class;
 
-            if (Utils.FACEBOOK.equals(app)) {
+            if (Utils.FACEBOOK.equalsIgnoreCase(app)) {
                 cl = GitHubTokenResponse.class;
-            } else if (Utils.GITHUB.equals(app)) {
+            } else if (Utils.GITHUB.equalsIgnoreCase(app)) {
                 cl = GitHubTokenResponse.class;
-            }else if (Utils.GOOGLE.equals(app)){
+            }else if (Utils.GOOGLE.equalsIgnoreCase(app)){
             	cl = OpenIdConnectResponse.class;
             }
 
@@ -91,7 +91,7 @@ public class TokenController {
             oauthParams.setExpiresIn(oauthResponse.getExpiresIn());
             oauthParams.setRefreshToken(Utils.isIssued(oauthResponse.getRefreshToken()));
             
-            if (Utils.GOOGLE.equals(app)){
+            if (Utils.GOOGLE.equalsIgnoreCase(app)){
             	String idToken = ((OpenIdConnectResponse)oauthResponse).getIdToken();
             	
             	oauthParams.setIdToken(idToken);



Mime
View raw message