You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oltu.apache.org by "Antonio Sanso (JIRA)" <ji...@apache.org> on 2012/07/27 16:06:33 UTC
[jira] [Commented] (AMBER-58) Add generic flow to client-demo
webapp
[ https://issues.apache.org/jira/browse/AMBER-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13423885#comment-13423885 ]
Antonio Sanso commented on AMBER-58:
------------------------------------
attaching proposed patch
### Eclipse Workspace Patch 1.0
#P amber-oauth2-client-demo
Index: src/main/java/org/apache/amber/oauth2/client/demo/Utils.java
===================================================================
--- src/main/java/org/apache/amber/oauth2/client/demo/Utils.java (revision 1366384)
+++ src/main/java/org/apache/amber/oauth2/client/demo/Utils.java (working copy)
@@ -42,6 +42,8 @@
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";
Index: src/main/java/org/apache/amber/oauth2/client/demo/controller/MainController.java
===================================================================
--- src/main/java/org/apache/amber/oauth2/client/demo/controller/MainController.java (revision 1366384)
+++ src/main/java/org/apache/amber/oauth2/client/demo/controller/MainController.java (working copy)
@@ -62,7 +62,10 @@
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);
Index: src/main/webapp/WEB-INF/views/index.jsp
===================================================================
--- src/main/webapp/WEB-INF/views/index.jsp (revision 1366384)
+++ src/main/webapp/WEB-INF/views/index.jsp (working copy)
@@ -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/github">Github</a>
> Add generic flow to client-demo webapp
> --------------------------------------
>
> Key: AMBER-58
> URL: https://issues.apache.org/jira/browse/AMBER-58
> Project: Amber
> Issue Type: Task
> Components: Client
> Affects Versions: 0.22
> Reporter: Antonio Sanso
> Assignee: Antonio Sanso
> Priority: Minor
> Labels: newbie
>
> The client demo webapp contains integration with some common OAuth 2.0 clients e.g. Facebook, github etc.
> It would be nice to have a generic flow not tight to any application
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira