ovh-angular-sso-auth

4.0.0-alpha.3 • Public • Published

ovh-angular-sso-auth

OVH component

NPM

Maintenance Chat on gitter Build Status

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

License

See https://github.com/ovh-ux/ovh-angular-sso-auth/blob/master/LICENSE

Readme

Keywords

none

Package Sidebar

Install

npm i ovh-angular-sso-auth

Weekly Downloads

0

Version

4.0.0-alpha.3

License

BSD-3-Clause

Unpacked Size

82.6 kB

Total Files

8

Last publish

Collaborators

  • marie-j
  • jisay
  • axelpeter
  • blary_jp
  • antleblanc
  • cbourgois
  • ovh-ux-cds
  • lizardk
  • ovh
  • gioindahouz
  • jleveugle
  • bnjjj
  • khuang