code: def post(self, request, provider=None):
          
          # if settings.CAS_FEDERATE is not True redirect to the login page
          if not settings.CAS_FEDERATE:
              logger.warning("CAS_FEDERATE is False, set it to True to use federation")
              return redirect("cas_server:login")
          # POST with a provider suffix, this is probably an SLO request. csrf is disabled for
          # allowing SLO requests reception
          try:
              provider = FederatedIendityProvider.objects.get(suffix=provider)
              auth = self.get_cas_client(request, provider)
              try:
                  auth.clean_sessions(request.POST['logoutRequest'])
              except (KeyError, AttributeError):
                  pass
              return HttpResponse("ok")
          # else, a User is trying to log in using an identity provider
          except FederatedIendityProvider.DoesNotExist:
              # Manually checking for csrf to protect the code below
              reason = CsrfViewMiddleware().process_view(request, None, (), {})
              if reason is not None:  # pragma: no cover (csrf checks are disabled during tests)
                  return reason  # Failed the test, stop here.
              form = forms.FederateSelect(request.POST)
              if form.is_valid():
                  params = utils.copy_params(
                      request.POST,
                      ignore={"provider", "csrfmiddlewaretoken", "ticket", "lt"}
                  )
                  if params.get("renew") == "False":
                      del params["renew"]
                  url = utils.reverse_params(
                      "cas_server:federateAuth",
                      kwargs=dict(provider=form.cleaned_data["provider"].suffix),
                      params=params
                  )
                  return HttpResponseRedirect(url)
              else:
                  return redirect("cas_server:login")
docs: method called on POST request
  
              :param django.http.HttpRequest request: The current request object
              :param unicode provider: Optional parameter. The user provider suffix.