|
11 | 11 | <h4>OIDC Claims</h4> |
12 | 12 | </div> |
13 | 13 | <div class="card-body"> |
14 | | - <p class="lead">When using BornHack as an IDP (logging into other sites using your BornHack account) you can control which user claims are returned by asking for one or more of the following claim scopes:</p> |
| 14 | + <p class="lead">When using BornHack as an IDP (logging into other sites using your BornHack account) you can control which user claims are returned by asking for one or more of the following claim scopes:</p> |
15 | 15 | <p><ul> |
16 | 16 | {% for scope in all_scopes %} |
17 | | - <li><code>{{ scope }}</code></li> |
| 17 | + <li><code>{{ scope }}</code></li> |
18 | 18 | {% endfor %} |
19 | 19 | </ul></p> |
20 | 20 | <p>Note: In addition to this list the default <code>openid</code> scope is available (it is part of the standard) and must always be included when asking for a jwt.</p> |
21 | 21 | <p class="lead">This form allows you to see which OIDC user claims are returned for your user with any combination of scopes.</p> |
22 | 22 | <form method="GET"> |
23 | | - {% bootstrap_form form %} |
24 | | - <button class="btn btn-primary" type="submit">Submit</button> |
| 23 | + {% bootstrap_form form %} |
| 24 | + <button class="btn btn-primary" type="submit">Submit</button> |
25 | 25 | </form> |
26 | 26 | <hr> |
27 | 27 | {% if not active_scopes %} |
28 | | - <p class="lead">Select scopes in the form to see user claims</p> |
| 28 | + <p class="lead">Select scopes in the form to see user claims</p> |
29 | 29 | {% else %} |
30 | | - <p class="lead">The following user claims will be returned in a jwt with these scopes:</p> |
31 | | - <p> |
32 | | - <ul> |
33 | | - {% for scope in active_scopes %} |
34 | | - <li><code>{{ scope }}</code></li> |
35 | | - {% endfor %} |
36 | | - </ul> |
37 | | - </p> |
38 | | - <table class="table table-striped"> |
39 | | - <tr> |
40 | | - <th>Claim Name</th> |
41 | | - <th>Required Scope</th> |
42 | | - <th>Claim Value (JSON)</th> |
43 | | - </tr> |
44 | | - <tr> |
45 | | - <td><code>sub</code></td> |
46 | | - <td><code>openid</code></td> |
47 | | - <td>{{ request.user.username }}</td> |
48 | | - </tr> |
49 | | - {% for claim, value in claims.items %} |
50 | | - {% for claimname, scope in scopes.items %} |
51 | | - {% if claimname == claim %} |
| 30 | + <p class="lead">The following user claims will be returned in a jwt with these scopes:</p> |
| 31 | + <p> |
| 32 | + <ul> |
| 33 | + {% for scope in active_scopes %} |
| 34 | + <li><code>{{ scope }}</code></li> |
| 35 | + {% endfor %} |
| 36 | + </ul> |
| 37 | + </p> |
| 38 | + <table class="table table-striped"> |
52 | 39 | <tr> |
53 | | - <td><code>{{ claim }}</code></td> |
54 | | - <td><code>{{ scope }}</code></td> |
55 | | - <td>{{ value }}</td> |
| 40 | + <th>Claim Name</th> |
| 41 | + <th>Required Scope</th> |
| 42 | + <th>Claim Value (JSON)</th> |
56 | 43 | </tr> |
57 | | - {% endif %} |
58 | | - {% endfor %} |
59 | | - {% endfor %} |
60 | | - </table> |
| 44 | + <tr> |
| 45 | + <td><code>sub</code></td> |
| 46 | + <td><code>openid</code></td> |
| 47 | + <td>{{ request.user.username }}</td> |
| 48 | + </tr> |
| 49 | + {% for claim, value in claims.items %} |
| 50 | + {% for claimname, scope in scopes.items %} |
| 51 | + {% if claimname == claim %} |
| 52 | + <tr> |
| 53 | + <td><code>{{ claim }}</code></td> |
| 54 | + <td><code>{{ scope }}</code></td> |
| 55 | + <td>{{ value }}</td> |
| 56 | + </tr> |
| 57 | + {% endif %} |
| 58 | + {% endfor %} |
| 59 | + {% endfor %} |
| 60 | + </table> |
61 | 61 | {% endif %} |
62 | 62 | </div> |
63 | 63 | </div> |
|
0 commit comments