"""This module contains the authentication classes for the ``api`` app"""

from rest_framework.authentication import SessionAuthentication


class CsrfExemptSessionAuthentication(SessionAuthentication):
    """Exempted CSRF Authentication class

    Authentication class who inherit from DRF ``SessionAuthentication``,
    overriding the ``enforce_csrf`` method allowing us to bypass the check.

    """

    def enforce_csrf(self, request):
        """Don't enforce the CSRF check

        For the parameters, see ``rest_framework.authentication.SessionAuthentication``
        """

        return
