mirror of https://github.com/portainer/portainer
feat(oauth): update OAuth UX
parent
17cf374c30
commit
78e2aaf7d4
|
@ -4,6 +4,9 @@ angular.module('portainer.extensions.oauth')
|
||||||
|
|
||||||
this.providers = [
|
this.providers = [
|
||||||
{
|
{
|
||||||
|
authUrl: 'https://login.microsoftonline.com/TENANT_ID/oauth2/authorize',
|
||||||
|
accessTokenUrl: 'https://login.microsoftonline.com/TENANT_ID/oauth2/token',
|
||||||
|
resourceUrl: 'https://graph.windows.net/TENANT_ID/me?api-version=2013-11-08',
|
||||||
userIdentifier: 'mail',
|
userIdentifier: 'mail',
|
||||||
scope: 'id,email,name',
|
scope: 'id,email,name',
|
||||||
name: 'microsoft'
|
name: 'microsoft'
|
||||||
|
|
|
@ -27,6 +27,10 @@ angular.module('portainer.extensions.oauth')
|
||||||
ctrl.settings.ResourceURI = provider.resourceUrl;
|
ctrl.settings.ResourceURI = provider.resourceUrl;
|
||||||
ctrl.settings.UserIdentifier = provider.userIdentifier;
|
ctrl.settings.UserIdentifier = provider.userIdentifier;
|
||||||
ctrl.settings.Scopes = provider.scopes;
|
ctrl.settings.Scopes = provider.scopes;
|
||||||
|
|
||||||
|
if (provider.name === 'microsoft' && ctrl.state.microsoftTenantID !== '') {
|
||||||
|
onMicrosoftTenantIDChange();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onInit() {
|
function onInit() {
|
||||||
|
|
|
@ -205,10 +205,10 @@
|
||||||
<div class="form-group" ng-if="$ctrl.state.provider.name != 'custom'">
|
<div class="form-group" ng-if="$ctrl.state.provider.name != 'custom'">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<a class="small interactive" ng-if="!$ctrl.state.overrideConfiguration" ng-click="$ctrl.state.overrideConfiguration = true;">
|
<a class="small interactive" ng-if="!$ctrl.state.overrideConfiguration" ng-click="$ctrl.state.overrideConfiguration = true;">
|
||||||
<i class="fa fa-plus space-right" aria-hidden="true"></i> Override configuration
|
<i class="fa fa-wrench space-right" aria-hidden="true"></i> Override configuration
|
||||||
</a>
|
</a>
|
||||||
<a class="small interactive" ng-if="$ctrl.state.overrideConfiguration" ng-click="$ctrl.state.overrideConfiguration = false;">
|
<a class="small interactive" ng-if="$ctrl.state.overrideConfiguration" ng-click="$ctrl.state.overrideConfiguration = false;">
|
||||||
<i class="fa fa-minus space-right" aria-hidden="true"></i> Hide advanced options
|
<i class="fa fa-cogs space-right" aria-hidden="true"></i> Use default configuration
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue