Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AuthService

Class

Hierarchy

  • AuthService

Index

Constructors

constructor

  • Constructor

    Parameters

    • server: ServerEndpoints

      Server endpoints for login and logut requests

    • roles: string[]

      List of role names which are authorized to access this app.

    • appType: string

      Type of app

    • withStore: boolean

      Whether to preserve response in storage or not

    • Optional keys: KeyLabels

      Labels used as key to store authentication detail on storage

    Returns AuthService

Properties

appType

appType: string

authorizedRoles

authorizedRoles: string[]

Private hasAccess

hasAccess: any

Check whether logged user has an access to this app or not

param
returns

keys

keys: KeyLabels

server

withStore

withStore: boolean

Methods

customer

  • customer(): Promise<any>

isLogged

  • isLogged(): Promise<boolean>

loggedUser

  • loggedUser(): Promise<any>

login

loginCustomer

  • loginCustomer(code: string, username: string, password: string): Promise<LoginResponse>
  • Attempt login with specified customer code, username and password

    Parameters

    • code: string

      Customer code

    • username: string

      Customer specific username

    • password: string

      Password

    Returns Promise<LoginResponse>

loginStudio

  • loginStudio(code: string, username: string, password: string): Promise<LoginResponse>
  • Attempt login with specified studio code, username and password

    Parameters

    • code: string

      Studio code

    • username: string

      Customer specific username

    • password: string

      Password

    Returns Promise<LoginResponse>

logout

  • logout(): Promise<string>

studio

  • studio(): Promise<any>

token

  • token(): Promise<any>

Generated using TypeDoc