added basic auth interface changes and supporting code
Dieser Commit ist enthalten in:
Ursprung
f331f80cbb
Commit
cc98a14d15
4 geänderte Dateien mit 91 neuen und 68 gelöschten Zeilen
|
@ -59,7 +59,7 @@ export default Ember.Controller.extend({
|
|||
});
|
||||
}
|
||||
} else {
|
||||
// basic auth
|
||||
// basic auth - no need to authorize separately
|
||||
}
|
||||
|
||||
window.location.href = authUrl + query;
|
||||
|
@ -104,6 +104,7 @@ export default Ember.Controller.extend({
|
|||
}
|
||||
|
||||
const endpoints = api.endpoints;
|
||||
|
||||
if (endpoints.length) {
|
||||
data['endpoints'] = JSON.stringify(endpoints);
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@ CustomWizardApi.reopenClass({
|
|||
tokenUrl: authorization.token_url,
|
||||
clientId: authorization.client_id,
|
||||
clientSecret: authorization.client_secret,
|
||||
username: authorization.username,
|
||||
password: authorization.password,
|
||||
authParams: Ember.A(authorization.auth_params),
|
||||
authorized: authorization.authorized,
|
||||
accessToken: authorization.access_token,
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
{{i18n 'admin.wizard.api.auth.settings'}}
|
||||
</div>
|
||||
|
||||
{{#if isOauth}}
|
||||
{{#if api.name}}
|
||||
<div class="control-group redirect-uri">
|
||||
<div class="control-label">
|
||||
|
@ -55,6 +56,7 @@
|
|||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
<div class="control-group auth-type">
|
||||
<label>{{i18n 'admin.wizard.api.auth.type'}}</label>
|
||||
|
@ -63,6 +65,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{#if isOauth}}
|
||||
<div class="control-group">
|
||||
<label>{{i18n 'admin.wizard.api.auth.url'}}</label>
|
||||
<div class="controls">
|
||||
|
@ -77,7 +80,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{#if isOauth}}
|
||||
<div class="control-group">
|
||||
<label>{{i18n 'admin.wizard.api.auth.client_id'}}</label>
|
||||
<div class="controls">
|
||||
|
@ -105,9 +107,24 @@
|
|||
{{d-button label='admin.wizard.api.auth.params.new' icon='plus' action='addParam'}}
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="control-group">
|
||||
<label>{{i18n 'admin.wizard.api.auth.username'}}</label>
|
||||
<div class="controls">
|
||||
{{input value=api.username}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{i18n 'admin.wizard.api.auth.password'}}</label>
|
||||
<div class="controls">
|
||||
{{input value=api.password}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{#if isOauth}}
|
||||
<div class="status">
|
||||
<div class="authorization">
|
||||
{{#if api.authorized}}
|
||||
|
@ -158,6 +175,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class="wizard-header">
|
||||
|
|
|
@ -149,6 +149,8 @@ en:
|
|||
token_url: "Token url"
|
||||
client_id: 'Client id'
|
||||
client_secret: 'Client secret'
|
||||
username: 'username'
|
||||
password: 'password'
|
||||
params:
|
||||
label: 'Params'
|
||||
new: 'New param'
|
||||
|
|
Laden …
In neuem Issue referenzieren