def post(self): jti = get_raw_jwt()['jti'] try: revoked_token = models.RevokedTokenModel(jti=jti) revoked_token.add() return {'message': 'Refresh token has been revoked'} except: return {'message': 'Something went wrong'}, 500
def revoke_access_token(jti): """Revoke given access token.""" revoked_token = models.RevokedTokenModel(jti=jti) revoked_token.add()