2017-10-25 20:35:57 -04:00
{% extends 'lemoncurry/layout.html' %}
2017-10-29 04:15:29 -04:00
{% load markdown static %}
2017-10-27 06:32:14 -04:00
{% block styles %}
< link rel = "stylesheet" type = "text/stylus" href = "{% static 'lemonauth/css/indie.styl' %}" / >
{% endblock %}
2017-10-25 20:35:57 -04:00
{% block main %}
< div class = "container" >
2017-10-28 23:39:30 -04:00
< form class = "card" method = "post" action = "{% url 'lemonauth:indie_approve' %}" >
2017-10-27 06:32:14 -04:00
< h4 class = "card-header h-x-app" >
{% if app %}< img class = "u-logo p-name" src = "{{ app.logo | first }}" alt = "{{ app.name | first }}" / > {% endif %}
2017-10-26 22:26:21 -04:00
sign in to
2017-10-27 06:32:14 -04:00
{% 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 %}?
2017-10-29 04:15:29 -04:00
{% if verified %}
2017-12-17 18:53:45 -05:00
< span data-tooltip data-theme = "success" data-html = "#verified-success" >
< i class = "fas fa-check-circle verified-success" > < / i >
< / span >
2017-10-29 04:15:29 -04:00
{% else %}
2017-12-17 18:53:45 -05:00
< span data-tooltip data-theme = "warning" data-html = "#verified-warning" >
< i class = "fas fa-question-circle verified-warning" > < / i >
< / span >
2017-10-29 04:15:29 -04:00
{% endif %}
2017-10-25 20:35:57 -04:00
< / h4 >
< div class = "card-body" >
2017-10-28 23:39:30 -04:00
< p class = "card-text" > do you want to confirm your identity, < a class = "code" href = "{{ me }}" > {{ me }}< / a > , with this app?< / p >
2017-10-31 22:27:55 -04:00
{% 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 >
2018-03-22 22:14:34 -04:00
< div class = "card-text form-group" >
2017-10-31 22:27:55 -04:00
{% for scope in scopes %}
2018-03-22 22:14:34 -04:00
< div class = "form-check" >
< input class = "form-check-input" id = "scopes-{{ scope }}" name = "scope" type = "checkbox" checked value = "{{ scope }}" / >
< label class = "form-check-label" for = "scopes-{{ scope }}" > {{ scope }}< / label >
< / div >
2017-10-31 22:27:55 -04:00
{% endfor %}
< / div >
{% endif %}
2017-11-02 20:28:26 -04:00
< p class = "card-text" > < small > you will be redirected to < a class = "code" href = "{{ redirect_uri }}" > {{ redirect_uri }}< / a > after authorising this app< / small > < / p >
2017-10-25 20:35:57 -04:00
< / div >
< div class = "card-footer" >
2017-10-26 22:26:21 -04:00
< button class = "btn btn-success" type = "submit" >
2017-12-05 22:07:59 -05:00
< i class = "fas fa-check" > < / i >
2017-10-25 20:35:57 -04:00
approve
< / button >
< / div >
{% csrf_token %}
2017-10-28 23:39:30 -04:00
< input name = "me" type = "hidden" value = "{{ me }}" / >
< input name = "client_id" type = "hidden" value = "{{ params.client_id }}" / >
2017-11-02 20:28:26 -04:00
< input name = "redirect_uri" type = "hidden" value = "{{ redirect_uri }}" / >
2017-10-28 23:39:30 -04:00
{% if params.state %}< input name = "state" type = "hidden" value = "{{ params.state }}" / > {% endif %}
< input name = "response_type" type = "hidden" value = "{{ params.response_type }}" / >
2017-10-25 20:35:57 -04:00
< / form >
< / div >
2017-10-29 04:15:29 -04:00
< 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 >
2017-10-25 20:35:57 -04:00
{% endblock %}