add oauth2 token managment, partial password change, bugfixes
This commit is contained in:
parent
6c388c8129
commit
6334c993a9
19 changed files with 236 additions and 137 deletions
45
templates/auth/base.html.j2
Normal file
45
templates/auth/base.html.j2
Normal file
|
@ -0,0 +1,45 @@
|
|||
{% extends 'base.html.j2' %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
<nav class="navbar navbar-dark fixed-top bg-dark flex-md-nowrap p-0 shadow">
|
||||
<div class="col-xs-1"><button id="sidebarCollapse" class="btn btn-primary d-xs-block d-md-none" ><i class="fa fa-bars fa-2x"></i></button></div>
|
||||
<div class="col-xs-11"><a class="navbar-brand col-xs-11 col-sm-3 col-md-2 mr-0" href="/">Lenticular Cloud</a></div>
|
||||
</nav>
|
||||
|
||||
<div style="height: 40px"></div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
{% for message in get_flashed_messages() %}
|
||||
<div class="alert alert-warning">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="row">
|
||||
{% if current_user.is_authenticated %}
|
||||
<nav class="col-md-2 d-none d-md-block bg-light sidebar fixed-top">
|
||||
<div class="sidebar-sticky active">
|
||||
{#<a href="/"><img alt="logo" class="container-fluid" src="/static/images/dog_main_small.png"></a>#}
|
||||
<li class="nav-item"><a class="nav-link" href="{{ url_for('frontend.index') }}">{{ gettext('Account') }}</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{{ url_for('frontend.client_cert') }}">{{ gettext('Client Cert') }}</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{{ url_for('frontend.totp') }}">{{ gettext('2FA - TOTP') }}</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{{ url_for('frontend.logout') }}">{{ gettext('Logout') }}</a></li>
|
||||
</div>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
<main class="col-md-9 ml-sm-auto col-lg-10 px-4" role="main">
|
||||
<h1>{% block title %}{% endblock %}</h1>
|
||||
<div class="card">
|
||||
<div class="card-body mt-5 mb-5">
|
||||
<div class="tab-content">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
14
templates/auth/consent.html.j2
Normal file
14
templates/auth/consent.html.j2
Normal file
|
@ -0,0 +1,14 @@
|
|||
{% extends 'auth/base.html.j2' %}
|
||||
|
||||
{% block title %}{{ gettext('Consent') }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p>
|
||||
The application "{{ client.client_id }}" requested the following scopes: {{ requested_scope }}
|
||||
</p>
|
||||
<p> Allow this app to access that data?</p>
|
||||
|
||||
{{ render_form(form) }}
|
||||
|
||||
{% endblock %}
|
11
templates/auth/login.html.j2
Normal file
11
templates/auth/login.html.j2
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends 'auth/base.html.j2' %}
|
||||
|
||||
{% block title %}{{ gettext('Login') }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
{{ render_form(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
25
templates/auth/login_auth.html.j2
Normal file
25
templates/auth/login_auth.html.j2
Normal file
|
@ -0,0 +1,25 @@
|
|||
{% extends 'auth/base.html.j2' %}
|
||||
|
||||
{% block title %}{{ gettext('Login') }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
{% for auth_name in forms.keys() %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{{' active' if loop.first else ''}}" id="home-tab" data-toggle="tab" href="#{{ auth_name }}" role="tab" aria-controls="home" aria-selected="true">{{ gettext(auth_name) }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content" id="myTabContent">
|
||||
{% for auth_name, form in forms.items() %}
|
||||
<div class="tab-pane fade{{ ' show active' if loop.first else '' }}" id="{{ auth_name }}" role="tabpanel" aria-labelledby="{{ auth_name }}-tab">
|
||||
|
||||
{{ render_form(form) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue