Merge pull request #19521 from civicrm/5.34
[civicrm-core.git] / ext / oauth-client / ang / oauthJwtDebug.aff.html
CommitLineData
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
ff3347fe 8 <div af-api4-ctrl="tokens" af-api4="['OAuthSysToken', 'get', {'where': [['id', '=', routeParams.id]]}]"></div>
bbfd04e1 9
ff3347fe
TO
10 <div ng-if="tokens.result.length == 0">
11 No tokens found.
bbfd04e1
TO
12 </div>
13
ff3347fe
TO
14 <div ng-repeat="token in tokens.result">
15
16 <h3>Token Record</h3>
bbfd04e1 17
ff3347fe 18 <pre>{{token|json}}</pre>
bbfd04e1
TO
19
20 <h3>Access Token: Raw</h3>
21
ff3347fe 22 <pre>{{token.access_token}}</pre>
bbfd04e1
TO
23
24 <h3>Access Token: JWT Payload</h3>
25
ff3347fe
TO
26 (This will only display meaningful data if the token is based on JWT.)
27
28 <pre>{{token.access_token|unvalidatedJwtDecode|json}}</pre>
bbfd04e1
TO
29
30 </div>
31
32</div>