Constructors

Properties

config: OidcSettings
configUserProvider: ConfigUserProvider
userManager: OidcManager

Methods

  • To get the generated login url, call getLoginURL(). This will call authz service and generate login url to be used.

    Parameters

    Returns Promise<string>

    authz url for login

    cidaasAuthenticationService.getLoginURL().then(function (response) {
    // the response will give you login url.
    }).catch(function(ex) {
    // your failure code here
    });
  • To get the user informations from defined UserStorage, call getUserInfoFromStorage(). This will fetch informations about the authenticated user such as tokens & user profiles, which has been stored in predefined user storage based on cidaas configuration. (default is session storage)

    Returns Promise<User>

    returns authenticated user if present, else null

    cidaasAuthenticationService.getUserInfoFromStorage().then(function (response) {
    // the response will give you profile details.
    }).catch(function(ex) {
    // your failure code here
    });
  • Once login successful, it will automatically redirects you to the redirect url, which is configured in cidaas config. To complete the login process, call loginCallback(). This will parses needed informations such as tokens in the redirect url.

    Parameters

    • Optionalurl: string

      optional url to read sign in state from

    Returns Promise<User>

    cidaasAuthenticationService.loginCallback().then(function (response: User) {
    // the response will give you login details.
    }).catch(function(ex) {
    // your failure code here
    });
  • To login through cidaas sdk, call loginWithBrowser(). This will generate and redirect the app to authz url in same window for logging in. Afterwards you will be redirected to the hosted login page. Once login successful, it will automatically redirects you to the redirect url, which is configured in cidaas config.

    Parameters

    Returns Promise<void>

    cidaasAuthenticationService.loginWithBrowser();
    
  • To end user session, call logout(). You need set the redirect url, if not it will automatically redirect to the login page

    Parameters

    Returns Promise<void>

    cidaasAuthenticationService.logout();
    
  • logoutCallback() will parses the details of userState after logout. Get the logout call state from the url provided, if none is provided current window url is used.

    Parameters

    • Optionalurl: string

      optional url to read signout state from,

    • Optionalkeepopen: boolean

      optional boolean to keep the popup window open after logout, in case of popupSignOut()

    Returns Promise<LogoutResponse>

    cidaasAuthenticationService.logoutCallback().then(function (response: LogoutResponse) {
    // the response will give you userState details.
    }).catch(function(ex) {
    // your failure code here
    });
  • To open the hosted login page in pop up window, call popupSignIn(). This will generate and open authz url in a popup window. On successful sign in, authenticated user is returned.

    Parameters

    • Optionaloptions: PopupSignInOptions

      optional options to over-ride the client config for popup sign in

    Returns Promise<User>

    cidaasAuthenticationService.popupSignIn().then(function (response) {
    // the response will give you user details after finishing loginCallback().
    }).catch(function(ex) {
    // your failure code here
    });
  • To open the hosted logout page in pop up window, call popupSignOut().

    Parameters

    Returns Promise<void>

    cidaasAuthenticationService.popupSignOut().then(function() {
    // success callback in main application window after finishing popupSignOutCallback().
    }).catch(function(ex) {
    // your failure code here
    });
  • To register through cidaas sdk, call registerWithBrowser(). This will generate and redirect the app to authz url in same window for register view. Afterwards you will be redirected to the hosted registration page.

    Parameters

    Returns Promise<void>

    cidaasAuthenticationService.registerWithBrowser();
    
  • renewToken() will update user information in user storage with a new token, based on refresh token that is stored in the storage. On successful token renewal, authenticated user is returned

    Parameters

    • Optionaloptions: RenewTokenOptions

      options to over-ride the client config for renewing token.

    Returns Promise<User>

    Authenticated user

    cidaasAuthenticationService.renewToken().then(function (response) {
    // the response will give you user details.
    }).catch(function(ex) {
    // your failure code here
    });
MMNEPVFCICPMFPCPTTAAATR