Fixed the OAuth 1.0 demo
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d89c487b Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d89c487b Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d89c487b Branch: refs/heads/2.6.x-fixes Commit: d89c487b8a6be48dec36a6f52480eac119401589 Parents: 1a620fa Author: Colm O hEigeartaigh <[email protected]> Authored: Wed May 7 17:55:28 2014 +0100 Committer: Colm O hEigeartaigh <[email protected]> Committed: Wed May 7 18:13:22 2014 +0100 ---------------------------------------------------------------------- .../demo/oauth/server/controllers/ApplicationController.java | 4 ++-- .../src/main/webapp/WEB-INF/views/authorizedClientsList.jsp | 2 +- .../oauth/server/src/main/webapp/WEB-INF/views/clientDetails.jsp | 4 ++++ .../src/main/webapp/WEB-INF/views/registeredClientsList.jsp | 2 +- .../cxf/rs/security/oauth/services/RequestTokenService.java | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/d89c487b/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/controllers/ApplicationController.java ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/controllers/ApplicationController.java b/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/controllers/ApplicationController.java index ca51dbc..a17264f 100644 --- a/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/controllers/ApplicationController.java +++ b/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/controllers/ApplicationController.java @@ -74,8 +74,8 @@ public class ApplicationController implements ServletContextAware { String secretKey = tokenGen.generate(new SecureRandom().generateSeed(20)); Client clientInfo = - new Client(consumerKey, secretKey, clientApp.getClientName(), - clientApp.getCallbackURL()); + new Client(consumerKey, secretKey, clientApp.getClientName(), null); + clientInfo.setCallbackURI(clientApp.getCallbackURL()); clientInfo.setLoginName(principal.getName()); Client authNInfo = clientManager.registerNewClient(consumerKey, clientInfo); http://git-wip-us.apache.org/repos/asf/cxf/blob/d89c487b/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/views/authorizedClientsList.jsp ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/views/authorizedClientsList.jsp b/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/views/authorizedClientsList.jsp index cef1b03..a54c0ac 100644 --- a/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/views/authorizedClientsList.jsp +++ b/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/views/authorizedClientsList.jsp @@ -44,7 +44,7 @@ under the License. </tr> <tr> <td>Callback URL:</td> - <td>${client.callbackURL}</td> + <td>${client.callbackURI}</td> </tr> <tr> <td colspan="2"> http://git-wip-us.apache.org/repos/asf/cxf/blob/d89c487b/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/views/clientDetails.jsp ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/views/clientDetails.jsp b/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/views/clientDetails.jsp index dd7f3a7..434faa4 100644 --- a/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/views/clientDetails.jsp +++ b/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/views/clientDetails.jsp @@ -40,6 +40,10 @@ under the License. <td>${clientInfo.secretKey}</td> </tr> <tr> + <td>Callback URL:</td> + <td>${clientInfo.callbackURI}</td> + </tr> + <tr> <td colspan="2"> <input type="submit" value="Register New Client"/> </td> http://git-wip-us.apache.org/repos/asf/cxf/blob/d89c487b/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/views/registeredClientsList.jsp ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/views/registeredClientsList.jsp b/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/views/registeredClientsList.jsp index 4c3d3b7..e08b683 100644 --- a/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/views/registeredClientsList.jsp +++ b/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/views/registeredClientsList.jsp @@ -43,7 +43,7 @@ under the License. </tr> <tr> <td>Callback URL:</td> - <td>${client.callbackURL}</td> + <td>${client.callbackURI}</td> </tr> <tr> <td colspan="2"> http://git-wip-us.apache.org/repos/asf/cxf/blob/d89c487b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/RequestTokenService.java ---------------------------------------------------------------------- diff --git a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/RequestTokenService.java b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/RequestTokenService.java index e54d788..a21341d 100644 --- a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/RequestTokenService.java +++ b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/RequestTokenService.java @@ -27,7 +27,7 @@ import javax.ws.rs.core.Response; /** - * This resource issues a temporarily request token to the Client + * This resource issues a temporary request token to the Client * which will be later authorised and exchanged for the access token */ @Path("/initiate")
