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

- constructor

### Properties

- verifyConnection_

### Methods

- changePassword
- checkUser_
- getEmail
- getRolesIds
- getRolesNames
- handleDisconnection
- login
- logout
- onSuccessfulLogin
- resetPassword
- resetUser

## Constructors

### constructor

- new AuthenticationService(): AuthenticationService

- - Defined in src/auth/service.ts:80

  #### Returns AuthenticationService

## Properties

### verifyConnection_

verifyConnection_: number

- Defined in src/auth/service.ts:78

## Methods

### changePassword

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

- - Defined in src/auth/service.ts:180

  #### Parameters

  - ##### login: string

    Login.

  - ##### oldPwd: string

    Old password.

  - ##### newPwd: string

    New password.

  - ##### confPwd: string

    New password confirmation.

  - ##### otp: string = undefined

  #### Returns Promise<void>

  Promise.

### checkUser_

- checkUser_(data: User): User

- - Defined in src/auth/service.ts:249

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

  #### Parameters

  - ##### data: User

    Ajax response.

  #### Returns User

  Response.

### getEmail

- getEmail(): string

- - Defined in src/auth/service.ts:301

  #### Returns string

  User's email

### getRolesIds

- getRolesIds(): number[]

- - Defined in src/auth/service.ts:308

  #### Returns number[]

  The roles IDs.

### getRolesNames

- getRolesNames(): string[]

- - Defined in src/auth/service.ts:315

  #### Returns string[]

  The roles names.

### handleDisconnection

- handleDisconnection(): void

- - Defined in src/auth/service.ts:147

  #### Returns void

### login

- login(login: string, pwd: string, otp?: string): Promise<void | User>

- - Defined in src/auth/service.ts:218

  #### Parameters

  - ##### login: string

    Login name.

  - ##### pwd: string

    Password.

  - ##### otp: string = undefined

  #### Returns Promise<void | User>

  Promise.

### logout

- logout(): Promise<void>

- - Defined in src/auth/service.ts:271

  #### Returns Promise<void>

  Promise.

### onSuccessfulLogin

- onSuccessfulLogin(data: User): User

- - Defined in src/auth/service.ts:264

  Method defined in the aim to be replaced.

  #### Parameters

  - ##### data: User

    Ajax response.

  #### Returns User

  Response.

### resetPassword

- resetPassword(login: string): Promise<AuthenticationDefaultResponse>

- - Defined in src/auth/service.ts:284

  #### Parameters

  - ##### login: string

    Login name.

  #### Returns Promise<AuthenticationDefaultResponse>

  Promise.

### resetUser

- resetUser(userState: UserState, noReload: boolean): void

- - Defined in src/auth/service.ts:349

  #### 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