summaryrefslogtreecommitdiffstats
path: root/templates/api/oauth_authorize.html
blob: 41aac0d0b34b930b73f025a623f343fd9e57656d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{% extends "base.html" %}

{% block title %}Authorize {{ application.name }}{% endblock %}

{% block content %}
    {% if not identities %}
        <p>
            You cannot give access to {{ application.name }} as you
            have no identities yet. Log in via the website and create
            at least one identity, then retry this process.
        </p>
    {% else %}
        <form method="POST">
            {% csrf_token %}
            <fieldset>
                <legend>Authorize</legend>
                <div class="field">
                    <div class="label-input">
                        <label for="identity">Select Identity</label>
                        <select name="identity" id="identity">
                            {% for identity in identities %}
                                <option value="{{ identity.pk }}">{{ identity.handle }}</option>
                            {% endfor %}
                        </select>
                    </div>
                </div>
                <p>Do you want to give {{ application.name }} access to this identity?</p>
                <p>It will have permission to: {{ scope }}</p>
                <input type="hidden" name="client_id" value="{{ application.client_id }}">
                <input type="hidden" name="redirect_uri" value="{{ redirect_uri }}">
                <input type="hidden" name="scope" value="{{ scope }}">
            </fieldset>
            <div class="buttons">
                <a href="#" class="secondary button left">Deny</a>
                <button>Allow</button>
            </div>
        </form>
    {% endif %}
{% endblock %}