canaille-globuzma/canaille/templates/oidc/authorize.html

65 lines
2.6 KiB
HTML
Raw Normal View History

2024-12-16 17:17:42 +00:00
{# Consent request template.
This templates is displayed to users accessing a new application that requests to access to personal information.
It lists the personal information requested by the application, and offers the user to accept or decline.
:param user: The user whose consent is asked.
:type user: :class:`~canaille.core.models.User`
:param grant: The OIDC grant.
:type grant: An Authlib ``Grant``
#}
{% extends theme('base.html') %}
{% import 'macro/form.html' as fui %}
2020-08-17 09:53:30 +00:00
{% block content %}
<div class="ui segment" hx-boost="false">
{% if client.logo_uri %}
2022-10-17 15:49:52 +00:00
<img class="ui centered tiny image" src="{{ client.logo_uri }}" alt="{{ client.client_name }}">
2021-12-20 22:57:27 +00:00
{% endif %}
2020-08-14 11:18:08 +00:00
<h2 class="ui header">
{% trans name=client.client_name %}The application {{ name }} is requesting access to:{% endtrans %}
</h2>
2020-08-14 11:18:08 +00:00
2021-12-20 22:57:27 +00:00
<div class="ui divided items">
{% for scope in grant.request.scope.split(" ") %}
{% if scope not in ignored_scopes %}
2021-12-20 22:57:27 +00:00
<div class="item">
{% if scope in scope_details %}
2021-12-20 22:57:27 +00:00
<div>
<i class="{{ scope_details[scope][0] }} large icon"></i>
{{ scope_details[scope][1] }}
2021-12-20 22:57:27 +00:00
</div>
{% else %}
<div class="ui tiny image">
<i class="huge user icon"></i>
{{ scope }}
2021-12-20 22:57:27 +00:00
</div>
{% endif %}
</div>
{% endif %}
{% endfor %}
2020-10-29 14:28:19 +00:00
</div>
2020-08-17 15:49:49 +00:00
2021-12-20 22:57:27 +00:00
<div class="ui center aligned container">
{{ gettext('You are logged in as %(name)s', name=user.formatted_name) }}
2021-12-20 22:57:27 +00:00
</div>
2020-11-06 10:57:21 +00:00
2021-12-20 22:57:27 +00:00
<div class="ui center aligned container">
{% call fui.render_form(form) %}
2021-12-20 22:57:27 +00:00
<div class="ui stackable buttons">
<button name="answer" type="submit" class="ui negative button" value="deny" id="deny">
{% trans %}Deny{% endtrans %}
</button>
<button name="answer" type="submit" class="ui button" value="logout" id="logout">
{% trans %}Switch user{% endtrans %}
</button>
<button name="answer" type="submit" class="ui primary button" value="accept" id="accept">
{% trans %}Accept{% endtrans %}
</button>
</div>
{% endcall %}
2021-12-20 22:57:27 +00:00
</div>
2020-08-17 15:49:49 +00:00
</div>
2020-08-17 09:53:30 +00:00
{% endblock %}