Commit | Line | Data |
---|---|---|
bbfd04e1 TO |
1 | <div id="bootstrap-theme"> |
2 | <div ng-init="data = {tokenId: routeParams.id, token: null}"></div> | |
3 | ||
4 | <p>This is a temporary debug page. It requires super user permissions or <code>manage oauth client secrets</code>.</p> | |
5 | ||
6 | <p>Some (but not all) OAuth2 tokens are based on <a href="https://en.wikipedia.org/wiki/JSON_Web_Token">JWT</a>. If a token is based on JWT, then we can examine its content to learn more about what the token signifies. This may help with debugging token-access issues.</p> | |
7 | ||
8 | <h3>Token ID</h3> | |
9 | ||
10 | <input ng-model="routeParams.id" type="text"/> | |
11 | ||
12 | <div class="btn-group"> | |
13 | <a class="btn btn-default" | |
14 | af-api4-action="['OAuthSysToken', 'get', {where: [['id', '=', data.tokenId]]}]" | |
15 | af-api4-start-msg="ts('Fetching...')" | |
16 | af-api4-success-msg="ts('Fetched')" | |
17 | af-api4-success="data.token = response" | |
18 | >{{ts('Inspect')}}</a> | |
19 | </div> | |
20 | ||
21 | ||
22 | <div ng-if="!!data.token"> | |
23 | ||
24 | <h3>Access Token: Raw</h3> | |
25 | ||
26 | <pre>{{data.token[0].access_token}}</pre> | |
27 | ||
28 | <h3>Access Token: JWT Payload</h3> | |
29 | ||
30 | <pre>{{data.token[0].access_token|unvalidatedJwtDecode|json}}</pre> | |
31 | ||
32 | </div> | |
33 | ||
34 | </div> |