Add auth and blacklist APIs
This commit is contained in:
12
server/__tests__/utils/withRevokedToken.js
Normal file
12
server/__tests__/utils/withRevokedToken.js
Normal file
@ -0,0 +1,12 @@
|
||||
const withToken = require('./withToken')
|
||||
const AuthAPI = require('../../AuthAPI')
|
||||
|
||||
function withRevokedToken(scopes, callback) {
|
||||
withToken(scopes, token => {
|
||||
AuthAPI.revokeToken(token).then(() => {
|
||||
callback(token)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = withRevokedToken
|
Reference in New Issue
Block a user