Refactor integrations of sso
This commit is contained in:
parent
ce5a7d05ac
commit
f377b4ce45
46 changed files with 154 additions and 249 deletions
40
web/templates/base.html
Normal file
40
web/templates/base.html
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<link rel="stylesheet" href="static/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="static/style.css">
|
||||
<script src="static/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="static/js/jquery-3.6.0.min.js"></script>
|
||||
<script src="static/js/js.cookie.min.js"></script>
|
||||
<script src="static/base.js"></script>
|
||||
<title>Stackspin Account</title>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
<script>
|
||||
var api_url = '{{ api_url }}';
|
||||
|
||||
// Actions
|
||||
$(document).ready(function() {
|
||||
check_flow_expired();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div class="loginpanel">
|
||||
|
||||
<div id="contentFlowExpired"
|
||||
class='alert alert-warning'
|
||||
style='display:none'>Your request is expired. Please resubmit your request faster.</div>
|
||||
|
||||
|
||||
<img src='static/logo.svg'/><br/><br/>
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
|
||||
</div>
|
||||
28
web/templates/loggedin.html
Normal file
28
web/templates/loggedin.html
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<script>
|
||||
var api_url = '{{ api_url }}';
|
||||
|
||||
// Actions
|
||||
$(document).ready(function() {
|
||||
//flow_login();
|
||||
check_flow_auth();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div id="contentMessages"></div>
|
||||
<div id="contentWelcome">Welcome {{ id['name'] }},<br/><br/>
|
||||
You are already logged in.
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
25
web/templates/login.html
Normal file
25
web/templates/login.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<script>
|
||||
var api_url = '{{ api_url }}';
|
||||
|
||||
// Actions
|
||||
$(document).ready(function() {
|
||||
flow_login();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div id="contentMessages"></div>
|
||||
<div id="contentLogin"></div>
|
||||
<div id="contentHelp">
|
||||
<a href='recovery'>Forget password?</a> | <a href='https://stackspin.net'>About stackspin</a>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
29
web/templates/recover.html
Normal file
29
web/templates/recover.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<script>
|
||||
var api_url = '{{ api_url }}';
|
||||
|
||||
// Actions
|
||||
$(document).ready(function() {
|
||||
flow_recover();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<div id="contentMessages"></div>
|
||||
<div id="contentRecover"></div>
|
||||
<div id="contentRecoverRequested" style='display:none'>
|
||||
Thank you for your request. We have sent you an email to recover
|
||||
your account. Please check your e-mail and complete the account
|
||||
recovery. You have limited time to complete this</div>
|
||||
|
||||
<div id="contentHelp">
|
||||
<a href='login'>Back to login page</a> | <a href='https://stackspin.org'>About stackspin</a>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
30
web/templates/settings.html
Normal file
30
web/templates/settings.html
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<script>
|
||||
var api_url = '{{ api_url }}';
|
||||
|
||||
// Actions
|
||||
$(document).ready(function() {
|
||||
flow_settings();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div id="contentMessages"></div>
|
||||
<div id="contentProfileSaved"
|
||||
class='alert alert-success'
|
||||
style='display:none'>Successfuly saved new settings.</div>
|
||||
<div id="contentProfileSaveFailed"
|
||||
class='alert alert-danger'
|
||||
style='display:none'>Your changes are not saved. Please check the fields for errors.</div>
|
||||
<div id="contentProfile"></div>
|
||||
<div id="contentPassword"></div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
Reference in a new issue