### Hierarchy

- Emitter
  - Auth

### Implements

- IEmitter

## Index

### Constructors

- constructor

### Properties

- _authInProgress
- _authenticated
- _selfTimeout
- _selfTimer
- _user
- config
- ippApi
- listeners
- onListeners
- polling
- storage
- $inject

### Accessors

- EVENT_401
- EVENT_ERROR
- EVENT_LOGGED_IN
- EVENT_LOGGED_OUT
- EVENT_LOGIN_REFRESHED
- EVENT_RE_LOGGING
- EVENT_USER_UPDATED
- user

### Methods

- authenticate
- emit
- getUserInfo
- login
- logout
- off
- on
- on401
- processAuth
- refreshTokens
- register
- removeEvent
- removeEvents
- saveTokens
- startPollingSelf
- unRegister

## Constructors

### constructor

- new Auth(config: any, ippApi: IApiService, storage: IStorageService): Auth

- Overrides Emitter.constructor

  - Defined in Auth.ts:86

  #### Parameters

  - ##### config: any

  - ##### ippApi: IApiService

  - ##### storage: IStorageService

  #### Returns Auth

## Properties

### Private _authInProgress

_authInProgress: boolean = false

- Defined in Auth.ts:79

### Private _authenticated

_authenticated: boolean = false

- Defined in Auth.ts:78

### Private _selfTimeout

_selfTimeout: number = 15 * 1000

- Defined in Auth.ts:82

### Private _selfTimer

_selfTimer: any

- Defined in Auth.ts:81

### Private _user

_user: IUserSelf | any

- Defined in Auth.ts:77

### Private config

config: any

- Defined in Auth.ts:88

### Private ippApi

ippApi: IApiService

- Defined in Auth.ts:88

### listeners

listeners: IListeners = []

Inherited from Emitter.listeners

- Defined in Emitter.ts:16

### onListeners

onListeners: any

Inherited from Emitter.onListeners

- Defined in Emitter.ts:17

### polling

polling: boolean = false

- Defined in Auth.ts:75

### Private storage

storage: IStorageService

- Defined in Auth.ts:88

### Static $inject

$inject: string[] = ['$q','$timeout','ippApiService','ippStorageService','ippConfig','ippUtilsService',]

- Defined in Auth.ts:43

## Accessors

### EVENT_401

- get EVENT_401(): string

- - Defined in Auth.ts:67

  #### Returns string

### EVENT_ERROR

- get EVENT_ERROR(): string

- - Defined in Auth.ts:64

  #### Returns string

### EVENT_LOGGED_IN

- get EVENT_LOGGED_IN(): string

- - Defined in Auth.ts:52

  #### Returns string

### EVENT_LOGGED_OUT

- get EVENT_LOGGED_OUT(): string

- - Defined in Auth.ts:61

  #### Returns string

### EVENT_LOGIN_REFRESHED

- get EVENT_LOGIN_REFRESHED(): string

- - Defined in Auth.ts:58

  #### Returns string

### EVENT_RE_LOGGING

- get EVENT_RE_LOGGING(): string

- - Defined in Auth.ts:55

  #### Returns string

### EVENT_USER_UPDATED

- get EVENT_USER_UPDATED(): string

- - Defined in Auth.ts:71

  #### Returns string

### user

- get user(): IUserSelf

- - Defined in Auth.ts:84

  #### Returns IUserSelf

## Methods

### authenticate

- authenticate(force?: boolean, tokens?: any): Promise<any>

- - Defined in Auth.ts:94

  #### Parameters

  - ##### Default value force: boolean = false

  - ##### Default value tokens: any = {}

  #### Returns Promise<any>

### emit

- emit(name: string, args?: any): void

- Inherited from Emitter.emit

  - Defined in Emitter.ts:51

  #### Parameters

  - ##### name: string

  - ##### Optional args: any

  #### Returns void

### Private getUserInfo

- getUserInfo(): Promise<IUserSelf>

- - Defined in Auth.ts:253

  #### Returns Promise<IUserSelf>

### login

- login(username: string, password: string): Promise<any>

- - Defined in Auth.ts:145

  #### Parameters

  - ##### username: string

  - ##### password: string

  #### Returns Promise<any>

### logout

- logout(all?: boolean, ignore?: boolean): void

- - Defined in Auth.ts:188

  #### Parameters

  - ##### Default value all: boolean = false

  - ##### Default value ignore: boolean = false

  #### Returns void

### off

- off(name: string, callback: any): void

- Inherited from Emitter.off

  - Defined in Emitter.ts:30

  #### Parameters

  - ##### name: string

  - ##### callback: any

  #### Returns void

### on

- on(name: string, callback: any): void

- Inherited from Emitter.on

  - Defined in Emitter.ts:23

  #### Parameters

  - ##### name: string

  - ##### callback: any

  #### Returns void

### Private on401

- on401(): void

- - Defined in Auth.ts:279

  #### Returns void

### Private processAuth

- processAuth(force?: boolean): Promise<any>

- - Defined in Auth.ts:214

  #### Parameters

  - ##### Default value force: boolean = false

  #### Returns Promise<any>

### Private refreshTokens

- refreshTokens(): Promise<any>

- - Defined in Auth.ts:241

  #### Returns Promise<any>

### register

- register(callback: any): void

- Inherited from Emitter.register

  - Defined in Emitter.ts:40

  #### Parameters

  - ##### callback: any

  #### Returns void

### removeEvent

- removeEvent(): void

- Implementation of IEmitter.removeEvent

  Inherited from Emitter.removeEvent

  - Defined in Emitter.ts:65

  #### Returns void

### removeEvents

- removeEvents(): void

- Implementation of IEmitter.removeEvents

  Inherited from Emitter.removeEvents

  - Defined in Emitter.ts:69

  #### Returns void

### Private saveTokens

- saveTokens(tokens: any): void

- - Defined in Auth.ts:246

  #### Parameters

  - ##### tokens: any

  #### Returns void

### Private startPollingSelf

- startPollingSelf(): void

- - Defined in Auth.ts:267

  #### Returns void

### unRegister

- unRegister(callback: any): void

- Inherited from Emitter.unRegister

  - Defined in Emitter.ts:44

  #### Parameters

  - ##### callback: any

  #### Returns void

Generated using TypeDoc