67 lines
3 KiB
HTML
67 lines
3 KiB
HTML
{% extends 'lemoncurry/layout.html' %}
|
|
{% load markdown static %}
|
|
|
|
{% block styles %}
|
|
<link rel="stylesheet" type="text/stylus" href="{% static 'lemonauth/css/indie.styl' %}" />
|
|
{% endblock %}
|
|
|
|
{% block main %}
|
|
<div class="container">
|
|
<form class="card" method="post" action="{% url 'lemonauth:indie_approve' %}">
|
|
<h4 class="card-header h-x-app">
|
|
{% if app %}<img class="u-logo p-name" src="{{ app.logo | first }}" alt="{{ app.name | first }}" />{% endif %}
|
|
sign in to
|
|
{% if app %}{{ app.name | first }}{% endif %}
|
|
{% if app %}({% endif %}<a class="u-url code{% if not app %} p-name{% endif %}" href="{{ params.client_id }}">{{ params.client_id }}</a>{% if app %}){% endif %}?
|
|
{% if verified %}
|
|
<i class="fa fa-check-circle verified-success" data-tooltip data-theme="success" data-html="#verified-success"></i>
|
|
{% else %}
|
|
<i class="fa fa-question-circle verified-warning" data-tooltip data-theme="warning" data-html="#verified-warning"></i>
|
|
{% endif %}
|
|
</h4>
|
|
|
|
<div class="card-body">
|
|
<p class="card-text">do you want to confirm your identity, <a class="code" href="{{ me }}">{{ me }}</a>, with this app?</p>
|
|
{% if params.response_type == 'code' %}
|
|
<p class="card-text">additionally, this app is requesting the following <i>scopes</i> - you can edit the scopes that will be granted to the app, if you wish</p>
|
|
<div class="custom-controls-stacked card-text">
|
|
{% for scope in scopes %}
|
|
<label class="custom-control custom-checkbox">
|
|
<input name="scope" type="checkbox" class="custom-control-input" checked value="{{ scope }}" />
|
|
<span class="custom-control-indicator"></span>
|
|
<span class="custom-control-description">{{ scope }}</span>
|
|
</label>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
<p class="card-text"><small>you will be redirected to <a class="code" href="{{ params.redirect_uri }}">{{ params.redirect_uri }}</a> after authorising this app</small></p>
|
|
</div>
|
|
|
|
<div class="card-footer">
|
|
<button class="btn btn-success" type="submit">
|
|
<i class="fa fa-check"></i>
|
|
approve
|
|
</button>
|
|
</div>
|
|
|
|
{% csrf_token %}
|
|
<input name="me" type="hidden" value="{{ me }}" />
|
|
<input name="client_id" type="hidden" value="{{ params.client_id }}" />
|
|
<input name="redirect_uri" type="hidden" value="{{ params.redirect_uri }}" />
|
|
{% if params.state %}<input name="state" type="hidden" value="{{ params.state }}" />{% endif %}
|
|
<input name="response_type" type="hidden" value="{{ params.response_type }}" />
|
|
</form>
|
|
</div>
|
|
|
|
<div id="verified-success" hidden>
|
|
this client has been <strong>verified</strong> using <code>{{ '<link rel="redirect_uri">' | force_escape }}</code> - they are who they claim to be!
|
|
</div>
|
|
<div id="verified-warning" hidden>
|
|
this client could <strong>not</strong> be verified using <code>{{ '<link rel="redirect_uri">' | force_escape }}</code> - check the redirect uri carefully yourself!
|
|
</div>
|
|
{% endblock %}
|
|
{% block foot %}
|
|
<script type="text/javascript">
|
|
tippy('[data-tooltip]', {arrow: true});
|
|
</script>
|
|
{% endblock %}
|