-
-
Save tiposaurio/a66fc96a9bb0c3ba5b96 to your computer and use it in GitHub Desktop.
Revisions
-
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ //html de invocacion <button type="button" class="btn btn-default" ng-click="login()"> <i class="fa fa-fw fa-sign-in"></i> Log in </button> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ // Definicion del login controller .controller( 'LoginController', [ '$scope', '$auth', function ( $scope, $auth ) { $scope.login = function () { if ( !$auth.isAuthenticated() ) { $auth.authenticate('sso') } }; }]); //Configuracion del proveedor de oauth2 app.config([ '$authProvider', function ( $authProvider ) { $authProvider.oauth2({ name: 'sso', url: 'auth', scope: ['read', 'write', 'trust'], scopeDelimiter: ',', requiredUrlParams: ['scope'], redirectUri: location.origin + location.pathname + '#/calculator', clientId: 'pagos_cliente', authorizationEndpoint: 'http://localhost:8080/sso/oauth/authorize' }); }]);