mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-12-16 00:52:41 +00:00
* perf: remove call client old- method via ?next=client * feat: add 2 decorators for login-get and login-callback-get to set next_page and get next_page from session * perf: code style * perf: handling the next parameter propagation issue in third-party authentication flows * perf: request.GET.dict() to copy() * perf: style import --------- Co-authored-by: Bai <baijiangjie@gmail.com>
21 lines
618 B
Python
21 lines
618 B
Python
from django.db.models.signals import post_delete
|
|
from django.dispatch import receiver
|
|
from django.core.cache import cache
|
|
from django.conf import settings
|
|
|
|
from oauth2_provider.models import get_application_model
|
|
|
|
from .utils import clear_oauth2_authorization_server_view_cache
|
|
|
|
__all__ = ['on_oauth2_provider_application_deleted']
|
|
|
|
|
|
Application = get_application_model()
|
|
|
|
|
|
@receiver(post_delete, sender=Application)
|
|
def on_oauth2_provider_application_deleted(sender, instance, **kwargs):
|
|
if instance.name == settings.OAUTH2_PROVIDER_JUMPSERVER_CLIENT_NAME:
|
|
clear_oauth2_authorization_server_view_cache()
|
|
|