# Class AuthManager

### Hierarchy

- AuthManager

### Constructors

- constructor

### Properties

- userName

### Methods

- checkSession
- logIn
- logOut
- redirectedLogIn

## Constructors

### constructor

- new AuthManager(serverUrl: string, serverType: ServerType, requestClient: RequestClient, loginCallback: function): AuthManager

- - Defined in src/auth/AuthManager.ts:13

  #### Parameters

  - ##### serverUrl: string

  - ##### serverType: ServerType

  - ##### requestClient: RequestClient

  - ##### loginCallback: function

    - - (): Promise<void>

      - #### Returns Promise<void>

  #### Returns AuthManager

## Properties

### userName

userName: string = ""

- Defined in src/auth/AuthManager.ts:10

## Methods

### checkSession

- checkSession(): Promise<object>

- - Defined in src/auth/AuthManager.ts:188

  Checks whether a session is active, or login is required.

  #### Returns Promise<object>

  - a promise which resolves with an object containing three values
  - a boolean `isLoggedIn`
  - a string `userName` and
  - a form `loginForm` if not loggedin.

### logIn

- logIn(username: string, password: string): Promise<LoginResult>

- - Defined in src/auth/AuthManager.ts:88

  Logs into the SAS server with the supplied credentials.

  #### Parameters

  - ##### username: string

    a string representing the username.

  - ##### password: string

    a string representing the password.

  #### Returns Promise<LoginResult>

  - a boolean `isLoggedin` and a string `username`

### logOut

- logOut(): Promise<boolean>

- - Defined in src/auth/AuthManager.ts:310

  Logs out of the configured SAS server.

  #### Returns Promise<boolean>

### redirectedLogIn

- redirectedLogIn(__namedParameters: object): Promise<LoginResult>

- - Defined in src/auth/AuthManager.ts:31

  Opens Pop up window to SAS Login screen. And checks if user has finished login process.

  #### Parameters

  - ##### __namedParameters: object

    - ##### onLoggedOut: undefined | function

  #### Returns Promise<LoginResult>

Generated using TypeDoc