1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-07 23:05:26 +02:00

refactor(auth): expose only the login url

This commit is contained in:
Chaim Lev Ari 2019-01-16 17:25:16 +02:00
parent 4cbde7bb0d
commit 24f066716b
3 changed files with 9 additions and 13 deletions

View file

@ -28,7 +28,7 @@
<!-- login button -->
<div class="form-group">
<div class="col-sm-12">
<a ng-href="{{ AuthorizationURI }}?response_type=code&client_id={{ ClientID }}&redirect_uri={{ RedirectURI }}&scope={{ Scopes }}&state=portainer"><div class="btn btn-primary btn-sm pull-right" ng-if="AuthenticationMethod === 3" style="margin-left:2px"><i class="fa fa-sign-in-alt" aria-hidden="true"></i> OAuth Login</div></a>
<a ng-href="{{OAuthLoginURI}}"><div class="btn btn-primary btn-sm pull-right" ng-if="AuthenticationMethod === 3" style="margin-left:2px"><i class="fa fa-sign-in-alt" aria-hidden="true"></i> OAuth Login</div></a>
<button type="submit" class="btn btn-primary btn-sm pull-right" ng-click="authenticateUser()"><i class="fa fa-sign-in-alt" aria-hidden="true"></i> Login</button>
<span class="pull-left" style="margin: 5px;" ng-if="state.AuthenticationError">
<i class="fa fa-exclamation-triangle red-icon" aria-hidden="true" style="margin-right: 2px;"></i>

View file

@ -84,10 +84,7 @@ function (urlHelper, $q, $scope, $state, $stateParams, $sanitize, Authentication
SettingsService.publicSettings()
.then(function success(settings) {
$scope.AuthenticationMethod = settings.AuthenticationMethod;
$scope.ClientID = settings.ClientID;
$scope.RedirectURI = settings.RedirectURI;
$scope.Scopes = settings.Scopes;
$scope.AuthorizationURI = settings.AuthorizationURI;
$scope.OAuthLoginURI = settings.OAuthLoginURI;
});
if ($stateParams.logout || $stateParams.error) {