Options
All
  • Public
  • Public/Protected
  • All
Menu

Authentication and Authorization service

Hierarchy

  • AuthStore

Index

Constructors

constructor

Methods

Static authenticate

  • Responsible for instantiating keycloak using provided config and authentication. It also creates hooks for refreshing token when token is expired which silently refresh token resulting seamless user experience once logged in

    Parameters

    • config: AuthContextConfig

      json object which is UI application specific keycloak configuration e.g. realm and clientID.

    • url: string

      json object which contains AAS url

    • redirect: boolean

      boolean which decides instantiation mode for keycloak. e.g. login-required or check-sso. login-required mode redirects user to login screen if not logged in already. check-sso only checks if already logged in without redirecting to login screen if not logged in.

    Returns AuthenticateResult

    json which contains keycloak instance and authenticated which is promise after initializing keycloak

Static from

  • from(keycloak: KeycloakInstance): Auth
  • Create instance of AuthStore from keycloak.

    Parameters

    • keycloak: KeycloakInstance

      keycloak instance instantiated using keycloak-js

    Returns Auth

Static getAASUrl

  • getAASUrl(): Promise<string>
  • Responsible for resolving AAS Server using location service. If not found returns AAS-server-url specified in config

    Returns Promise<string>

    url AAS server url

Static onTokenExpired

  • onTokenExpired(keycloak: KeycloakInstance): void

Generated using TypeDoc