You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jumpserver/apps/authentication/backends/cas/middleware.py

11 lines
333 B

from django_cas_ng.middleware import CASMiddleware as _CASMiddleware
from django.core.exceptions import MiddlewareNotUsed
from django.conf import settings
class CASMiddleware(_CASMiddleware):
def __init__(self, **kwargs):
super().__init__(**kwargs)
if not settings.AUTH_CAS:
raise MiddlewareNotUsed