IdentityRecord
Identity record
Static Method Summary
| Static Public Methods | ||
| public static |
clear() Clear record from storage |
|
| public static |
restore(config: IdentityConfig, env: string, key: string, token: string): IdentityRecord Restore record from storage |
|
| public static |
store(env: string, key: string, token: string, user: IdentityUser): IdentityRecord Create and persist record in storage |
|
Constructor Summary
| Public Constructor | ||
| public |
constructor(properties: Object) IdentityRecord constructor |
|
Static Public Methods
public static restore(config: IdentityConfig, env: string, key: string, token: string): IdentityRecord source
Restore record from storage
If env, key and/or token are specified they are verified to match with stored data.
Session TTL is also verified by the stored timestamp and IdentityConfig#sessionTimeout.
If the stored data is invalid then this returns null.
If user TTL has expired according to IdentityConfig#userTimeout then IdentityRecord#user will be null.
Params:
| Name | Type | Attribute | Description |
| config | IdentityConfig | Identity config |
|
| env | string |
|
Identity environment |
| key | string |
|
Identity App key |
| token | string |
|
Identity session token |
public static store(env: string, key: string, token: string, user: IdentityUser): IdentityRecord source
Create and persist record in storage
Params:
| Name | Type | Attribute | Description |
| env | string | Identity environment |
|
| key | string | Identity App key |
|
| token | string | Identity session token |
|
| user | IdentityUser | Identity user |
Manual
Reference
Source
Test
