Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AuthenticationService

An "authentication" service for a GeoMapFish application. Upon loading, it launches a request to determine whether a user is currently logged in or not.

The possible API requests it supports, which are all self-explanatory, are:

  • changePassword
  • login
  • logout
  • resetPassword

Hierarchy

  • AuthenticationService

Index

Constructors

Properties

originalUrl: string = window.location.href
verifyConnection_: number

Methods

  • changePassword(login: string, oldPwd: string, newPwd: string, confPwd: string, otp?: string): Promise<void>
  • Parameters

    • login: string

      Login.

    • oldPwd: string

      Old password.

    • newPwd: string

      New password.

    • confPwd: string

      New password confirmation.

    • otp: string = undefined

    Returns Promise<void>

    Promise.

  • Check the user to have a user with all parameters in all cases.

    Parameters

    • data: User

      Ajax response.

    Returns User

    Response.

  • getEmail(): string
  • getRolesIds(): number[]
  • getRolesNames(): string[]
  • handleDisconnection(): void
  • login(login: string, pwd: string, otp?: string): Promise<void | User>
  • Parameters

    • login: string

      Login name.

    • pwd: string

      Password.

    • otp: string = undefined

    Returns Promise<void | User>

    Promise.

  • logout(): Promise<void>
  • resetPassword(login: string): Promise<AuthenticationDefaultResponse>
  • Parameters

    • login: string

      Login name.

    Returns Promise<AuthenticationDefaultResponse>

    Promise.

  • resetUser(userState: UserState, noReload: boolean): void
  • Parameters

    • userState: UserState

      state of the user.

    • noReload: boolean

      Don't request a new user object from the back-end after logging out, defaults to false.

    Returns void

Generated using TypeDoc