Repository: cxf-fediz Updated Branches: refs/heads/master de6f9870f -> 0829b2eae
Minor updates to JSP pages Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/0829b2ea Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/0829b2ea Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/0829b2ea Branch: refs/heads/master Commit: 0829b2eae50a6ba908f191882eb4ee0de456890b Parents: de6f987 Author: Sergey Beryozkin <sberyoz...@gmail.com> Authored: Fri Jan 15 12:31:49 2016 +0000 Committer: Sergey Beryozkin <sberyoz...@gmail.com> Committed: Fri Jan 15 12:31:49 2016 +0000 ---------------------------------------------------------------------- .../webapp/WEB-INF/views/clientCodeGrants.jsp | 26 ++++++++------ .../main/webapp/WEB-INF/views/clientTokens.jsp | 36 +++++++++++++------- 2 files changed, 39 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/0829b2ea/services/oidc/src/main/webapp/WEB-INF/views/clientCodeGrants.jsp ---------------------------------------------------------------------- diff --git a/services/oidc/src/main/webapp/WEB-INF/views/clientCodeGrants.jsp b/services/oidc/src/main/webapp/WEB-INF/views/clientCodeGrants.jsp index 5afb966..885b150 100644 --- a/services/oidc/src/main/webapp/WEB-INF/views/clientCodeGrants.jsp +++ b/services/oidc/src/main/webapp/WEB-INF/views/clientCodeGrants.jsp @@ -44,7 +44,7 @@ <h1>Code Grants issued to <%= client.getApplicationName() + "(" + client.getClientId() + ")"%></h1> <br/> <table border="1"> - <tr><th>ID</th><th>Issue Date</th><th>Expiry Date</th></tr> + <tr><th>ID</th><th>Issue Date</th><th>Expiry Date</th><th>Action</th></tr> <% SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss", Locale.US); dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); @@ -60,18 +60,22 @@ %> <%= issued %><br/> </td> - <td> - <% - Date expiresDate = new Date((token.getIssuedAt() + token.getExpiresIn()) * 1000); - String expires = dateFormat.format(expiresDate); + <% + if (token.getExpiresIn() > 0) { + Date expiresDate = new Date((token.getIssuedAt() + token.getExpiresIn()) * 1000); + String expires = dateFormat.format(expiresDate); + %> + <td><%= expires %></td> + <% + } else { + %> + <td>Never</td> + <% + } %> - <%= expires %><br/> - </td> <td> - <form action="/fediz-oidc/clients/<%= client.getClientId() + "/codes/" + token.getTokenKey() + "/revoke"%>" method="POST"> - <div data-type="control_button" class="form-line"> - <button class="form-submit-button" type="submit">Delete</button> - </div> + <form action="/fediz-oidc/clients/<%= client.getClientId() + "/codes/" + token.getCode() + "/revoke"%>" method="POST"> + <input type="submit" value="Delete"/> </form> </td> </tr> http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/0829b2ea/services/oidc/src/main/webapp/WEB-INF/views/clientTokens.jsp ---------------------------------------------------------------------- diff --git a/services/oidc/src/main/webapp/WEB-INF/views/clientTokens.jsp b/services/oidc/src/main/webapp/WEB-INF/views/clientTokens.jsp index ca58329..4b4a3d4 100644 --- a/services/oidc/src/main/webapp/WEB-INF/views/clientTokens.jsp +++ b/services/oidc/src/main/webapp/WEB-INF/views/clientTokens.jsp @@ -80,13 +80,19 @@ %> <%= issued %><br/> </td> - <td> - <% - Date expiresDate = new Date((token.getIssuedAt() + token.getExpiresIn()) * 1000); - String expires = dateFormat.format(expiresDate); + <% + if (token.getExpiresIn() > 0) { + Date expiresDate = new Date((token.getIssuedAt() + token.getExpiresIn()) * 1000); + String expires = dateFormat.format(expiresDate); + %> + <td><%= expires %></td> + <% + } else { + %> + <td>Never</td> + <% + } %> - <%= expires %><br/> - </td> <% if (token.getRefreshToken() != null) { %> @@ -132,13 +138,19 @@ %> <%= issued %><br/> </td> - <td> - <% - Date expiresDate = new Date((token.getIssuedAt() + token.getExpiresIn()) * 1000); - String expires = dateFormat.format(expiresDate); + <% + if (token.getExpiresIn() > 0) { + Date expiresDate = new Date((token.getIssuedAt() + token.getExpiresIn()) * 1000); + String expires = dateFormat.format(expiresDate); + %> + <td><%= expires %></td> + <% + } else { + %> + <td>Never</td> + <% + } %> - <%= expires %><br/> - </td> <td> <% for (String at : token.getAccessTokens()) {