示例#1
0
def lookup_access_token_for_user(user_obj, token_uuid):
    try:
        return OAuthAccessToken.get(
            OAuthAccessToken.authorized_user == user_obj,
            OAuthAccessToken.uuid == token_uuid)
    except OAuthAccessToken.DoesNotExist:
        return None
示例#2
0
def lookup_access_token_by_uuid(token_uuid):
    try:
        return OAuthAccessToken.get(OAuthAccessToken.uuid == token_uuid)
    except OAuthAccessToken.DoesNotExist:
        return None