'Authenticate the user
There are three options
a.) We have permissions, proceed with the view
b.) We tried getting permissions and failed, abort...
c.) We are about to ask for permissions'

def authenticate(self, fn, request, *args, **kwargs):

    redirect_uri = self.get_redirect_uri(request)
    oauth_url = get_oauth_url(self.scope_list, redirect_uri, extra_params=self.extra_params)
    graph = get_persistent_graph(request, redirect_uri=redirect_uri)
    permissions_granted = has_permissions(graph, self.scope_list)
    if permissions_granted:
        response = self.execute_view(fn, request, graph=graph, *args, **kwargs)
    elif (request.POST.get('attempt', request.GET.get('attempt')) == '1'):
        response = self.authentication_failed(fn, request, *args, **kwargs)
    else:
        response = self.oauth_redirect(oauth_url, redirect_uri)
    return response
