Methods
addAuthListener(listener)
- Description:
- Adds an authentication listener, it will be notified of login and logout events. 
 
- Source:
Parameters:
| Name | Type | Description | 
|---|---|---|
| listener | function | 
(async) getUserEntry() → {Promise.<Entry>}
Returns:
on success the entry for the currently signed in user is provided.
- Type
- Promise.<Entry>
(async) getUserInfo() → {Promise.<EntryInfo>}
- Description:
- Yields information about who currently is authenticated against the EntryStore repository. 
 
- Source:
- See:
- 
        - auth
- logout
 
Returns:
- upon success an object containing attributes "user" being the username, "id" of the user entry, and "homecontext" being the entry-id of the home context is provided.
- Type
- Promise.<EntryInfo>
(async) login(user, password, maxAge) → {Promise}
- Description:
- Authenticate using credentials containing a user, a password and an optional maxAge given in seconds. 
 
- Source:
Parameters:
| Name | Type | Description | 
|---|---|---|
| user | ||
| password | ||
| maxAge | 
Returns:
- Type
- Promise
(async) logout() → {Promise.<{user, id}>}
Returns:
The guest user info
- Type
- Promise.<{user, id}>
messageListeners(topic, obj)
Parameters:
| Name | Type | Description | 
|---|---|---|
| topic | String | |
| obj | 
removeAuthListener(listener)
Parameters:
| Name | Type | Description | 
|---|---|---|
| listener | function |