Constructor
+ + +new BlacklistedTokensManager(options)
+ + + + + + + + + +-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
+
+
+
+
+
+object
+
+
+
+ |
+
+
+
+
+
+
+ The client options. + + + +
|
+
Methods
+ + + +add(token, cbopt) → {Promise|undefined}
+ + + + + +Blacklist a new token.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
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.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
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);
+});
+
+