code: def websso(request):
      
      referer = request.META.get('HTTP_REFERER', settings.OPENSTACK_KEYSTONE_URL)
      auth_url = utils.clean_up_auth_url(referer)
      token = request.POST.get('token')
      try:
          request.user = auth.authenticate(request=request, auth_url=auth_url,
                                           token=token)
      except exceptions.KeystoneAuthException as exc:
          if utils.is_websso_default_redirect():
              res = django_http.HttpResponseRedirect(settings.LOGIN_ERROR)
          else:
              msg = 'Login failed: %s' % six.text_type(exc)
              res = django_http.HttpResponseRedirect(settings.LOGIN_URL)
              res.set_cookie('logout_reason', msg, max_age=10)
          return res
  
      auth_user.set_session_from_user(request, request.user)
      auth.login(request, request.user)
      if request.session.test_cookie_worked():
          request.session.delete_test_cookie()
      return django_http.HttpResponseRedirect(settings.LOGIN_REDIRECT_URL)
docs: Logs a user in using a token from Keystone's POST.