Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ovh-angular-sso-auth

ovh-ux1BSD-3-Clause4.0.0-alpha.3

OVH Single Sign On module

readme

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

changelog

4.0.0-alpha.3 (2019-01-09)

Bug Fixes

  • dependecy injection: add missing ng-inject (4ed063f)

4.0.0-alpha.2 (2018-11-27)

Bug Fixes

  • deps: upgrade npm-run-all to v4.1.5 (967d36d)

4.0.0-alpha.1 (2018-10-29)

4.0.0-alpha.0 (2018-10-29)

Bug Fixes

2.0.0

Breaking Changes

  • Transform isLogged to return a promise

    3.0.0

    Feature

  • Add handleSwitchSession and USERID mgmt