-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
70 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,51 @@ | ||
{% extends "../base.html" %} | ||
{% extends "base.html" %} | ||
|
||
{% block title %} | ||
OAuth Login | ||
{% endblock %} | ||
|
||
{% macro add_query_params() %} | ||
<input type="hidden" name="client_id" value="{{ query.client_id }}" /> | ||
<input type="hidden" name="redirect_uri" value="{{ query.redirect_uri }}" /> | ||
<input type="hidden" name="response_type" value="{{ query.response_type }}" /> | ||
<input type="hidden" name="scope" value="{{ query.scope }}" /> | ||
<input type="hidden" name="state" value="{{ query.state.as_deref().unwrap_or("") }}" /> | ||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}" /> | ||
{% endmacro %} | ||
<br /> | ||
{% block title %} OAuth Login {% endblock %} | ||
|
||
{% block body %} | ||
<p class="header"> | ||
Kitsune | ||
</p> | ||
<br /> | ||
{% macro add_query_params() -%} | ||
<input type="hidden" name="client_id" value="{{ query.client_id }}" /> | ||
<input type="hidden" name="redirect_uri" value="{{ query.redirect_uri }}" /> | ||
<input type="hidden" name="response_type" value="{{ query.response_type }}" /> | ||
<input type="hidden" name="scope" value="{{ query.scope }}" /> | ||
<input type="hidden" name="state" value="{{ query.state }}" /> | ||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}" /> | ||
{%- endmacro %} {% block body %} | ||
<p class="header">Kitsune</p> | ||
|
||
<div class="consent-text"> | ||
<span class="appName">{{app_name}}</span> wants the following access to your Kitsune account: | ||
<p> | ||
<ul> | ||
{% for scope in scopes %} | ||
<li> | ||
{{ scope.get_message().unwrap() }} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</p> | ||
</div> | ||
<div class="consent-text"> | ||
<span class="appName">{{app_name}}</span> wants the following access to your | ||
Kitsune account: | ||
<p></p> | ||
<ul> | ||
{% for scope in scopes %} | ||
<li>{{ scope.get_message().unwrap() }}</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
|
||
<div class="consent-forms"> | ||
<form method="get"> | ||
{% call add_query_params() %} | ||
<input type="hidden" name="login_consent" value="accept" /> | ||
<input class="formButton" type="submit" value="Accept" /> | ||
</form> | ||
<div class="consent-forms"> | ||
<form method="get"> | ||
{% add_query_params() %} | ||
<input type="hidden" name="login_consent" value="accept" /> | ||
<input class="formButton" type="submit" value="Accept" /> | ||
</form> | ||
|
||
<form method="get"> | ||
{% call add_query_params() %} | ||
<input type="hidden" name="login_consent" value="deny" /> | ||
<input class="formButton" type="submit" value="Deny" /> | ||
</form> | ||
</div> | ||
<form method="get"> | ||
{% add_query_params() %} | ||
<input type="hidden" name="login_consent" value="deny" /> | ||
<input class="formButton" type="submit" value="Deny" /> | ||
</form> | ||
</div> | ||
|
||
<div class="disclaimer"> | ||
Authenticated as <span class="authUsername">{{ authenticated_username }}</span> ~ | ||
<a href="#" | ||
onclick="document.cookie='user_id=; expires=Thu, 01 Jan 1970 00:00:00 UTC;';window.location.reload();">Logout</a> | ||
</div> | ||
<div class="disclaimer"> | ||
Authenticated as | ||
<span class="authUsername">{{ authenticated_username }}</span> ~ | ||
<a | ||
href="#" | ||
onclick="document.cookie='user_id=; expires=Thu, 01 Jan 1970 00:00:00 UTC;';window.location.reload();" | ||
>Logout</a | ||
> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters