def load_user_from_request(request):
    user = None
    if hasattr(request, 'oauth'):
        user = request.oauth.user
    else:
        is_valid, oauth = oauth2.verify_request(scopes=[])
        if is_valid:
            user = oauth.user
    return user
Load user from OAuth2 Authentication header.
dataset/ETHPy150Open frol/flask-restplus-server-example/app/modules/auth/__init__.py/load_user_from_request