-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added support for 0x100 bad id association TIF code
using set_unusable_password() in RandomPasswordUserCreationForm renamed RandomPasswordUserCreationForm to PasswordLessUserCreationForm added SQRL management option to Django admin by introducing AdminSiteSQRLIdentityManagementView adjusted existing tests as necessary to accommodate changes added form submit buttons next to SQRL QR codes to make it more obvious that SQRL can be triggered by clicking vs only scanning QR code added instructions in README on how to add SQRL urls
- Loading branch information
Showing
16 changed files
with
322 additions
and
75 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
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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{% extends "admin/base_site.html" %} | ||
{% load i18n admin_static %} | ||
{% load sqrl %} | ||
|
||
{% block title %}Manage SQRL{% endblock %} | ||
{% block content_title %}<h1>Manage SQRL</h1>{% endblock %} | ||
|
||
{% block extrahead %}{{ block.super }} | ||
<script src="{% static 'sqrl/sqrl.js' %}"></script> | ||
{% endblock %} | ||
|
||
{% block extrastyle %}{{ block.super }} | ||
<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}"/> | ||
{% endblock %} | ||
|
||
|
||
{% block userlinks %} | ||
{% url 'django-admindocs-docroot' as docsroot %} | ||
{% if docsroot %} | ||
<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / | ||
{% endif %} | ||
{% trans 'Manage SQRL' %} / | ||
<a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a> | ||
{% endblock %} | ||
|
||
{% block breadcrumbs %} | ||
<div class="breadcrumbs"> | ||
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> | ||
› {% trans 'Manage SQRL' %} | ||
</div> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div id="content-main"> | ||
|
||
{% if not user.sqrl_identity %} | ||
<p> | ||
You dont have SQRL identity associated with your account yet. | ||
Please use SQRL link/QR code below to associate SQRL identity with your account. | ||
</p> | ||
{% else %} | ||
<p> | ||
Congratulations! You already have SQRL identity associated with your account. | ||
If you would like to either change or delete existing SQRL identity | ||
associated with your account, you can do that by selecting appropriate | ||
option in your SQRL client and then using the SQRL link/QR code below. | ||
</p> | ||
|
||
<p> | ||
<strong>Note:</strong> For both changing or deleting your SQRL identity, | ||
you will need to load your SQRL rescue code. | ||
</p> | ||
|
||
<p> | ||
<strong>Caution:</strong> Normally it is not advised to change or delete | ||
your SQRL identity. Usually these operations are only required when | ||
SQRL identity is compromised. | ||
</p> | ||
{% endif %} | ||
|
||
{% sqrl as sqrl %} | ||
|
||
<fieldset class="module aligned"> | ||
<p> | ||
{% sqrl_status_url_script_tag sqrl %} | ||
<a href="{{ sqrl.sqrl_url }}"> | ||
<img src="{% sqrl_qr_image_url sqrl %}" width="200"> | ||
</a> | ||
{# redirect to manage page after successful SQRL transaction #} | ||
<input type="hidden" name="next" value="{% url 'admin-sqrl_manage' %}"> | ||
</p> | ||
</fieldset> | ||
|
||
<form method="get" action="{{ sqrl.sqrl_url }}" class="sqrl"> | ||
<div class="submit-row"> | ||
<input type="hidden" name="nut" value="{{ sqrl.nut.nonce }}"> | ||
<input type="submit" value="Manage SQRL" class="default" style="float: left;"> | ||
</div> | ||
</form> | ||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% extends 'contrib/admin/templates/admin/base.html' %} | ||
{% load i18n admin_static %} | ||
|
||
{% block userlinks %} | ||
{% if site_url %} | ||
<a href="{{ site_url }}">{% trans 'View site' %}</a> / | ||
{% endif %} | ||
{% if user.is_active and user.is_staff %} | ||
{% url 'django-admindocs-docroot' as docsroot %} | ||
{% if docsroot %} | ||
<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / | ||
{% endif %} | ||
{% endif %} | ||
{% if user.has_usable_password %} | ||
<a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> / | ||
{% endif %} | ||
<a href="{% url 'admin-sqrl_manage' %}">{% trans 'Manage SQRL' %}</a> / | ||
<a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a> | ||
{% endblock %} |
Oops, something went wrong.