Initial mfa support (for internal users) #93591

Merged
Oleg-Komarov merged 46 commits from mfa into main 2024-08-29 11:44:06 +02:00
5 changed files with 15 additions and 45 deletions
Showing only changes of commit f62ea85d1f - Show all commits

View File

@ -25,12 +25,8 @@
</div>
{% endif %}
{% endif %}
{% with field=form.otp_token %}
{% include "components/forms/field.html" %}
{% endwith %}
{% with field=form.otp_trust_agent %}
{% include "components/forms/field.html" with with_help_text=True %}
{% endwith %}
{% include "components/forms/field.html" with field=form.otp_token %}
{% include "components/forms/field.html" with field=form.otp_trust_agent with_help_text=True %}
</fieldset>
{{ form.non_field_errors }}
<button class="btn btn-block btn-accent">Continue</button>

View File

@ -9,18 +9,10 @@
<form method="POST" id="u2f-authenticate-form">{% csrf_token %}
<fieldset class="mb-4">
<p>Please use a security key you have configured. Tick the checkbox below before using the key if you want to remember this device.</p>
{% with field=form.otp_trust_agent %}
{% include "components/forms/field.html" with with_help_text=True %}
{% endwith %}
{% with field=form.response %}
{% include "components/forms/field.html" %}
{% endwith %}
{% with field=form.signature %}
{% include "components/forms/field.html" %}
{% endwith %}
{% with field=form.state %}
{% include "components/forms/field.html" %}
{% endwith %}
{% include "components/forms/field.html" with field=form.otp_trust_agent with_help_text=True %}
{% include "components/forms/field.html" with field=form.response %}
{% include "components/forms/field.html" with field=form.signature %}
{% include "components/forms/field.html" with field=form.state %}
</fieldset>
{{ form.non_field_errors }}
<div id="webauthn-error"></div>

View File

@ -13,9 +13,7 @@ Disable Multi-factor Authentication
</p>
<form method="post">{% csrf_token %}
{% with form=form|add_form_classes %}
{% with field=form.disable_mfa_confirm %}
{% include "components/forms/field.html" %}
{% endwith %}
{% include "components/forms/field.html" with field=form.disable_mfa_confirm %}
{% endwith %}
<div class="d-inline-flex mt-3">
<button type="submit" class="btn btn-danger">Disable</button>

View File

@ -33,18 +33,10 @@ Multi-factor Authentication Setup
<div class="col-md-6">
{% with form=form|add_form_classes %}
<form method="post">{% csrf_token %}
{% with field=form.name %}
{% include "components/forms/field.html" %}
{% endwith %}
{% with field=form.code %}
{% include "components/forms/field.html" %}
{% endwith %}
{% with field=form.key %}
{% include "components/forms/field.html" %}
{% endwith %}
{% with field=form.signature %}
{% include "components/forms/field.html" %}
{% endwith %}
{% include "components/forms/field.html" with field=form.name %}
{% include "components/forms/field.html" with field=form.code %}
{% include "components/forms/field.html" with field=form.key %}
{% include "components/forms/field.html" with field=form.signature %}
<div class="d-inline-flex">
<button type="submit" class="btn btn-primary">Validate</button>
<a class="btn btn-secondary ml-3" href="{% url 'bid_main:mfa' %}">Cancel</a>

View File

@ -12,18 +12,10 @@ Multi-factor Authentication Setup
<div class="col-md-6">
{% with form=form|add_form_classes %}
<form method="post" id="u2f-register-form">{% csrf_token %}
{% with field=form.credential %}
{% include "components/forms/field.html" %}
{% endwith %}
{% with field=form.name %}
{% include "components/forms/field.html" %}
{% endwith %}
{% with field=form.signature %}
{% include "components/forms/field.html" %}
{% endwith %}
{% with field=form.state %}
{% include "components/forms/field.html" %}
{% endwith %}
{% include "components/forms/field.html" with field=form.credential %}
{% include "components/forms/field.html" with field=form.name %}
{% include "components/forms/field.html" with field=form.signature %}
{% include "components/forms/field.html" with field=form.state %}
<div class="d-inline-flex">
<button type="submit" class="btn btn-primary">Add security key</button>
<a class="btn btn-secondary ml-3" href="{% url 'bid_main:mfa' %}">Cancel</a>