def verify_token_response(request):
    token = request.get('payload').get('accessToken')
    _token = AuthToken.get(AuthToken.access_token == token)
    user_id = _token.user_id
    client_id = _token.client_id
    resp = {'code': 0, 'data': {'user_id': user_id, 'client_id': client_id}}
    return resp
Exemplo n.º 2
0
def verify_token_response(request):
    token = json.loads(request.data.decode()).get('payload').get('accessToken')
    print('\r\n request.data \r\n', request.data.decode())
    _token = AuthToken.get(AuthToken.access_token == token)
    user_id = _token.user_id
    client_id = _token.client_id
    resp = {'code': 0, 'data': {'user_id': user_id, 'client_id': client_id}}
    print('\r\n request.response \r\n', resp)
    return resp