def authorize(token):
    """
    Authorizes the token and returns the object meant to be stored into g.user.

    Returns None if authorization failed, else the user object.

    You must monkey patch this method to make use of the View.
    """
    raise NotImplementedError()
