[auth] Added api key and basic authorization

This commit is contained in:
Anna Bodnia
2016-03-04 20:55:57 +02:00
parent 0e698af5b1
commit 42be315276
17 changed files with 433 additions and 294 deletions

View File

@@ -1,19 +0,0 @@
<div class='auth_container'>
<div class='key_input_container'>
<div class='auth__description'>{{description}}</div>
<div>
<span class='auth_label'><label for='input_apiKey_entry'><span>Api key</span> in {{in}}</label></span>
<span class='auth_in'><label for='input_apiKey_entry'>{{name}} =</label></span>
{{#if isLogout}}
<span class="auth_label">{{value}}</span>
{{else}}
<input placeholder='api_key' class='auth_input input_apiKey_entry' name='apiKey' type='text'/>
{{/if}}
</div>
{{#if isLogout}}
<input type="button" class="auth_logout__button" value="logout"></div>
{{else}}
<div class='auth_submit'><a class='auth_submit_button' href='#' data-sw-translate>apply</a></div>
{{/if}}
</div>
</div>

View File

@@ -1,17 +0,0 @@
<div class='auth_container basic_auth_container'>
<h3 class="basic_auth__title">Basic authentication</h3>
{{#if isLogout}}
<input type="button" class="auth_logout__button" value="logout"></div>
{{else}}
<form class="key_input_container">
<div class="auth__description">{{description}}</div>
<div class="auth_label"><label data-sw-translate>username</label></div>
<input required placeholder="username" class="basic_auth__username auth_input" name="username" type="text"/>
<div class="auth_label"><label data-sw-translate>password</label></div>
<input required placeholder="password" class="basic_auth__password auth_input" name="password" type="password"/>
<div class='auth_submit'><input type="submit" class="auth_submit__button" value="apply"></div>
</form>
{{/if}}
</div>