"""Django signals for ECP Auth.

Provides signals that are dispatched during ECP authentication
events: successful login, failed login, registration, and logout.
"""

from __future__ import annotations

import logging

from django.dispatch import Signal

logger: logging.Logger = logging.getLogger(__name__)

#: Dispatched when a user successfully authenticates via ECP.
#: Provides: sender, request, user, certificate_info
ecp_login_success = Signal()

#: Dispatched when ECP authentication fails.
#: Provides: sender, request, reason, certificate_info (may be None)
ecp_login_failed = Signal()

#: Dispatched when a new user registers via ECP.
#: Provides: sender, request, user, certificate_info
ecp_user_registered = Signal()

#: Dispatched when a user logs out from an ECP session.
#: Provides: sender, request, user
ecp_logout = Signal()

#: Dispatched when a new certificate is linked to a user.
#: Provides: sender, user, certificate_info
ecp_certificate_linked = Signal()
