Constructor
new BlacklistedTokensManager(options)
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object
|
The client options.
|
Members
resource :external:RestClient
Provides an abstraction layer for consuming the Auth0 Blacklisted Tokens endpoint.
Type:
(inner) clientOptions :Object
Options object for the Rest Client instace.
Type:
-
Object
Methods
add(token, cbopt) → {Promise|undefined}
Blacklist a new token.
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
token |
Object
|
Token data.
|
||||||||||
cb |
function
|
<optional> |
Callback function. |
Returns:
- Type:
-
Promise
|undefined
Example
var token = {
aud: 'aud',
jti: 'jti'
};
management.blacklistedTokens.add(token, function (err) {
if (err) {
// Handle error.
}
// Token blacklisted.
});
getAll(cbopt) → {Promise|undefined}
Get all blacklisted tokens.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cb |
function
|
<optional> |
Callback function. |
Returns:
- Type:
-
Promise
|undefined
Example
management.blacklistedTokens.getAll(function (err, tokens) {
console.log(tokens.length);
});