mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-08-01 06:01:42 +00:00
Added authorization endpoints
This commit is contained in:
parent
01a747da1d
commit
37108dbf56
6 changed files with 406 additions and 0 deletions
35
templates/oauth/authorize.html.twig
Normal file
35
templates/oauth/authorize.html.twig
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{% extends "main_card.html.twig" %}
|
||||
|
||||
{% block title %}{% trans %}oauth.authorize.title{% endtrans %}{% endblock %}
|
||||
|
||||
{% block card_title %}<h5>
|
||||
<i class="fa-solid fa-key fa-fw" aria-hidden="true"></i>
|
||||
{% trans %}oauth.authorize.title{% endtrans %}
|
||||
</h5>
|
||||
{% endblock %}
|
||||
|
||||
{% block card_content %}
|
||||
<p>{% trans with {'%client%': client.name} %}oauth.authorize.description{% endtrans %}</p>
|
||||
|
||||
{% if levels is not empty %}
|
||||
<p>{% trans %}oauth.authorize.scopes_intro{% endtrans %}</p>
|
||||
<ul>
|
||||
{% for level in levels %}
|
||||
<li>{{ (level.translationKey)|trans }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<p class="text-muted">{% trans %}oauth.authorize.revoke_hint{% endtrans %}</p>
|
||||
|
||||
<form method="post" action="{{ app.request.requestUri }}">
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token(csrf_token_id) }}">
|
||||
|
||||
<button type="submit" name="oauth_decision" value="deny" class="btn btn-secondary">
|
||||
{% trans %}oauth.authorize.deny{% endtrans %}
|
||||
</button>
|
||||
<button type="submit" name="oauth_decision" value="approve" class="btn btn-primary">
|
||||
{% trans %}oauth.authorize.approve{% endtrans %}
|
||||
</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue