Class AuthManager
Constructors
constructor
- new AuthManager(serverUrl: string, serverType: ServerType, requestClient: RequestClient, loginCallback: function): AuthManager
-
Parameters
-
serverUrl: string
-
serverType: ServerType
-
-
loginCallback: function
Properties
userName
userName: string = ""
Methods
checkSession
- checkSession(): Promise<object>
-
Returns Promise<object>
- a promise which resolves with an object containing two values - a boolean
isLoggedIn, and a string userName.
logIn
- logIn(username: string, password: string): Promise<object>
-
Parameters
-
username: string
-
password: string
Returns Promise<object>
logOut
- logOut(): Promise<boolean>
Checks whether a session is active, or login is required.