Default to session authentication if logged in

This commit is contained in:
Emmanouil Konstantinidis 2017-02-27 15:54:32 +00:00
parent cade72e80e
commit d911e81113
2 changed files with 11 additions and 1 deletions

View File

@ -273,8 +273,9 @@ body {
}
.api-modal .modal-body .request-awaiting {
text-align: center;
padding: 35px 10px;
color: #7F8177;
text-align: center;
}
.api-modal .modal-body .meta {

View File

@ -76,6 +76,15 @@
const schema = {{ schema }}
const doc = codec.decode(schema)
{% if user.is_authenticated %}
window.auth = {
'type': 'session',
};
$('#selected-authentication').text('session');
$('#auth-control').children().removeClass('active');
$('#auth-control').find("[data-auth='session']").addClass('active');
{% endif %}
// Language Control
$('#language-control li').click(function (event) {
event.preventDefault();