ovh-angular-sso-auth
v4.0.0-alpha.3
Published
OVH Single Sign On module
Downloads
13
Maintainers
Keywords
Readme
ovh-angular-sso-auth
OVH $http interceptor working with sso. Can be used with $resource!
Installation
Bower
bower install ovh-angular-sso-auth --save
NPM
npm install ovh-angular-sso-auth --save
Get the sources
git clone https://github.com/ovh-ux/ovh-angular-sso-auth.git
cd ovh-angular-sso-auth
npm install
bower install
You've developed a new cool feature ? Fixed an annoying bug ? We'd be happy to hear from you !
Have a look in CONTRIBUTING.md
Usage
.config(["ssoAuthenticationProvider", '$httpProvider', 'constants',
function (authentication, $httpProvider, constants) {
"use strict";
authentication.setLoginUrl(constants.prodMode ? constants.loginUrl : "auth.html");
authentication.setLogoutUrl(constants.prodMode ? "/engine/api/auth/logout" : "api/proxypass/auth/logout");
authentication.setUserUrl(constants.prodMode ? "/engine/api/me" : "api/user");
authentication.setConfig([
{
serviceType: "api",
urlPrefix: "api"
},
{
serviceType: "aapi",
urlPrefix: constants.prodMode ? "../2api-m" : "2api-m"
},
{
serviceType: "apiv6",
urlPrefix: "apiv6"
}
]);
$httpProvider.interceptors.push("ssoAuthInterceptor");
}
])
.run(['ssoAuthentication', function (authentication) {
"use strict";
authentication.login().then(function () {
// Do what you want after login
});
}])
Related links
- Contribute: https://github.com/ovh-ux/ovh-angular-sso-auth/blob/master/CONTRIBUTING.md
- Report bugs: https://github.com/ovh-ux/ovh-angular-sso-auth/issues
- Get latest version: https://github.com/ovh-ux/ovh-angular-sso-auth
License
See https://github.com/ovh-ux/ovh-angular-sso-auth/blob/master/LICENSE