[auth] Added api key and basic authorization
This commit is contained in:
12
src/main/template/apikey_auth.handlebars
Normal file
12
src/main/template/apikey_auth.handlebars
Normal file
@@ -0,0 +1,12 @@
|
||||
<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>
|
||||
</div>
|
||||
@@ -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>
|
||||
10
src/main/template/auth_view.handlebars
Normal file
10
src/main/template/auth_view.handlebars
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="auth_container">
|
||||
|
||||
<div class="auth_inner"></div>
|
||||
|
||||
{{#if isLogout}}
|
||||
<input type="button" class="auth_logout__button" value="logout">
|
||||
{{else}}
|
||||
<div class="auth_submit"><a class="auth_submit_button" href="#" data-sw-translate>apply</a></div>
|
||||
{{/if}}
|
||||
</div>
|
||||
12
src/main/template/basic_auth.handlebars
Normal file
12
src/main/template/basic_auth.handlebars
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class='basic_auth_container'>
|
||||
<h3 class="basic_auth__title">Basic authentication{{#if isLogout}} - authorized{{/if}}</h3>
|
||||
{{#unless isLogout}}
|
||||
<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"/>
|
||||
</form>
|
||||
{{/unless}}
|
||||
</div>
|
||||
@@ -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>
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
<h4><span data-sw-translate>Implementation Notes</span></h4>
|
||||
<div class="markdown">{{{description}}}</div>
|
||||
{{/if}}
|
||||
{{#if security}}
|
||||
<div class='authorize-wrapper'></div>
|
||||
{{/if}}
|
||||
{{#oauth}}
|
||||
<div class="auth">
|
||||
<span class="api-ic ic-error">{{/oauth}}
|
||||
|
||||
Reference in New Issue
Block a user