Add self resouce provider
This commit is contained in:
parent
dc181bd3a8
commit
af49242192
7 changed files with 77 additions and 29 deletions
|
@ -42,10 +42,10 @@
|
|||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if user.access_token.scope %}
|
||||
{% if access_token_scope %}
|
||||
<div>
|
||||
<span>Scopes</span>:
|
||||
{% for scope in user.access_token.scope.split(' ') %}
|
||||
{% for scope in access_token_scope.split(' ') %}
|
||||
<span class="scope">{{ scope }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -61,6 +61,7 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
<hr>
|
||||
{% if user %}
|
||||
<p class="center">
|
||||
Fetch resources from the resource server with your authentication token:
|
||||
</p>
|
||||
|
@ -68,17 +69,9 @@
|
|||
<button onclick="get_resource('time', '{{ user.access_token }}', '{{ oidc_provider_settings.id }}')">Time</button>
|
||||
<button onclick="get_resource('bs', '{{ user.access_token }}', '{{ oidc_provider_settings.id }}')">BS</button>
|
||||
</div>
|
||||
<div class="resources">
|
||||
<div v-if="Object.entries(resource).length > 0" class="resource">
|
||||
<div v-for="(value, key) in resource">
|
||||
<div class="key">{{ key }}</div>
|
||||
<div v-if="key == 'sorry' || key == 'error'" class="error">{{ value }}</div>
|
||||
<div v-else class="value">{{ value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="msg" class="msg resource">{{ msg }}</div>
|
||||
<div id="resource" class="resource"></div>
|
||||
<hr>
|
||||
{% endif %}
|
||||
<div class="content">
|
||||
<p>
|
||||
These links should get different response codes depending on the authorization:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue