Repository: cxf-fediz Updated Branches: refs/heads/master 2fb89f80d -> 72f32fe4c
Prorotyping an OOB response form to support public clients without redirect uris Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/72f32fe4 Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/72f32fe4 Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/72f32fe4 Branch: refs/heads/master Commit: 72f32fe4c78b336e062814ab3123713b7c1b95a2 Parents: 2fb89f8 Author: Sergey Beryozkin <[email protected]> Authored: Mon Nov 16 13:14:52 2015 +0000 Committer: Sergey Beryozkin <[email protected]> Committed: Mon Nov 16 13:14:52 2015 +0000 ---------------------------------------------------------------------- .../WEB-INF/views/oOBAuthorizationResponse.jsp | 52 ++++++++++++++++++++ 1 file changed, 52 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/72f32fe4/services/oidc/src/main/webapp/WEB-INF/views/oOBAuthorizationResponse.jsp ---------------------------------------------------------------------- diff --git a/services/oidc/src/main/webapp/WEB-INF/views/oOBAuthorizationResponse.jsp b/services/oidc/src/main/webapp/WEB-INF/views/oOBAuthorizationResponse.jsp new file mode 100644 index 0000000..0ac4342 --- /dev/null +++ b/services/oidc/src/main/webapp/WEB-INF/views/oOBAuthorizationResponse.jsp @@ -0,0 +1,52 @@ +<%@ page import="javax.servlet.http.HttpServletRequest, org.apache.cxf.rs.security.oauth2.common.OOBAuthorizationResponse" %> + +<% + OOBAuthorizationResponse authResponse = (OOBAuthorizationResponse)request.getAttribute("data"); + String basePath = request.getContextPath() + request.getServletPath(); + if (!basePath.endsWith("/")) { + basePath += "/"; + } +%> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Authorization Code Response</title> + <STYLE TYPE="text/css"> + <!-- + div.padded { + padding-left: 2em; + } + --> +</STYLE> +</head> +<body> +<div class="padded"> + +<h1> +<%= authResponse.getUserId() %>, here is an authorization code for a public <%= authResponse.getClientDescription() %> with id <%= authResponse.getClientId() %> +</h1> +<em></em> +<br/> +<table border="1"> + <tr><th><big><big>Code</big></big></th><th><big><big>Expires In</big></big></th></tr> + <tr> + <td><big><big><%= authResponse.getAuthorizationCode() %></big></big></td> + <td><big><big><%= authResponse.getExpiresIn() %></big></big></td> + </tr> + +</table> + +<br/> +Please enter the code into this public client application. +<br/> +<p> +<big><big> +</p> +<br/> +<p> +Back to <a href="<%= basePath %>client">Client Registration page</a> +</p> +</big></big> +</div> +</body> +</html> +
