# Class AuthServiceInstance

#### Not Exported

#### Hierarchy (view full)

- RWSService
  - AuthServiceInstance

- Defined in src/services/AuthService.ts:34

#####
Index

### Constructors

constructor

### Properties

_RELOADABLE
user
_instances

### Methods

authenticate
authorize
getReloadable
getUser
reloadService
setUser
getSingleton

## Constructors

### constructor

- new AuthServiceInstance(): AuthServiceInstance

- #### Returns AuthServiceInstance

  Overrides RWSService.constructor

  - Defined in src/services/AuthService.ts:37

## Properties

### _RELOADABLE

_RELOADABLE: boolean = false

Inherited from RWSService._RELOADABLE

- Defined in src/services/_service.ts:2

### `Private` user

user: Partial<IDbUser>

- Defined in src/services/AuthService.ts:35

### `Static` `Protected` _instances

_instances: {
[key: string]: RWSService;
} = {}

#### Type declaration

- ##### [key: string]: RWSService

Inherited from RWSService._instances

- Defined in src/services/_service.ts:7

## Methods

### authenticate

- authenticate(clientId, jwt_token?, userListManager?): Promise<boolean>

- #### Parameters

  - ##### clientId: string

  - ##### jwt_token: string = null

  - ##### userListManager: UserListManager = _DEFAULTS_USER_LIST_MANAGER

  #### Returns Promise<boolean>

  - Defined in src/services/AuthService.ts:41

### authorize

- authorize<IUser>(token, constructor): Promise<IUser>

- #### Type Parameters

  - #### IUser extends {
    db: RWSModel<any>;
    loadDbUser: (() => Promise<void>);
    }

  #### Parameters

  - ##### token: string

  - ##### constructor: (new (data) => IUser)

    - - new (data): IUser

      - #### Parameters

        - ##### data: any

        #### Returns IUser

  #### Returns Promise<IUser>

  - Defined in src/services/AuthService.ts:90

### getReloadable

- getReloadable(): string

- #### Returns string

  Inherited from RWSService.getReloadable

  - Defined in src/services/_service.ts:19

### getUser

- getUser<IUser>(): IUser

- #### Type Parameters

  - #### IUser extends {
    db: RWSModel<any>;
    loadDbUser: (() => Promise<void>);
    }

  #### Returns IUser

  - Defined in src/services/AuthService.ts:85

### reloadService

- reloadService<T>(this, ...params): InstanceType<T>

- #### Type Parameters

  - #### T extends (new (...args) => RWSService)

  #### Parameters

  - ##### this: T

  - ##### `Rest` ...params: any[]

  #### Returns InstanceType<T>

  Inherited from RWSService.reloadService

  - Defined in src/services/_service.ts:23

### setUser

- setUser<IUser>(user): AuthServiceInstance

- #### Type Parameters

  - #### IUser extends {
    db: RWSModel<any>;
    loadDbUser: (() => Promise<void>);
    }

  #### Parameters

  - ##### user: IUser

  #### Returns AuthServiceInstance

  - Defined in src/services/AuthService.ts:78

### `Static` getSingleton

- getSingleton<T>(this): InstanceType<T>

- #### Type Parameters

  - #### T extends (new (...args) => RWSService)

  #### Parameters

  - ##### this: T

  #### Returns InstanceType<T>

  Inherited from RWSService.getSingleton

  - Defined in src/services/_service.ts:9

Generated using TypeDoc