Module providing one time authentication
- Description:
Module providing one time authentication
- Source:
Methods
(static) check_if_expired(options)
- Description:
Checks if token is not expired yet
- Source:
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | options for the task Properties
|
(static) clean(options)
- Description:
Clean all expired tokens
- Source:
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | options for the task Properties
|
(static) extend_token(options)
- Description:
extent token life spas
- Source:
Parameters:
| Name | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | options for the task Properties
|
(static) getToken() → {string}
- Description:
Generates auhtentication ID
- Source:
Returns:
id to be used when saving the task
- Type
- string
(static) read(options)
- Description:
Get whole token information from database
- Source:
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | options for the task Properties
|
(static) save(options)
- Description:
Store token for later authentication
- Source:
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | options for the task Properties
|
(static) verify(options)
- Description:
Verify token and expire it
- Source:
Parameters:
| Name | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | options for the task Properties
|
(static) verify_return(options)
- Description:
Similar to authorizer.verify. Only difference - return token owner if valid.
- Source:
Parameters:
| Name | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | options for the task Properties
|
(inner) verify_token(options, return_owner, return_data)
- Description:
Token validation function called from verify and verify return
- Source:
Parameters:
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | options for the task Properties
|
|||||||||||||||
return_owner |
boolean | states if in callback owner shold be returned. If return_owner==false, returns true or false. |
|||||||||||||||
return_data |
boolean | states if in callback all token data should be returned. |