Exemplo n.º 1
0
def identity(payload):
    """ Takes in a payload, and the payload is the contents of the JWT Token
    and then we're going to extract the user ID from that payload, and once
    we have the user ID we can retrieve the specific user that matches this payload.
    """
    user_id = payload["identity"]
    return User.find_by_id(user_id)
Exemplo n.º 2
0
def identity(payload):
    user_id = payload['identity']
    return User.find_by_id(user_id)  # userid_mapping.get(user_id, None)
Exemplo n.º 3
0
def identity(payload):
    user_id = payload['identity']
    return User.find_by_id(user_id)