ó
    q™hp  ã                   óV   • S r SSKrSSKJr  \R                  " S5      r " S S\5      rg)a=  
CAS OIDC backend
https://apereo.github.io/cas/6.6.x/authentication/OIDC-Authentication.html

Backend for authenticating with Apereo CAS using OIDC. This backend handles
the minor implementation differences between the Apereo CAS OIDC server
implementation and the standard OIDC implementation in Python Social Auth.
é    Né   )ÚOpenIdConnectAuthÚsocialc                   ó8   • \ rS rSrSrSrSrS rS rS r	S r
S	rg
)ÚCASOpenIdConnectAuthé   a‰  
Open ID Connect backends for use with Apereo CAS.
Currently only the code response type is supported.

It can also be directly instantiated as a generic OIDC backend.
To use it you will need to set at minimum:

SOCIAL_AUTH_CAS_OIDC_ENDPOINT = 'https://.....'  # endpoint without /.well-known/openid-configuration
SOCIAL_AUTH_CAS_KEY = '<client_id>'
SOCIAL_AUTH_CAS_SECRET = '<client_secret>'
ÚcasTc                 ój   • U R                  SU R                  5      n[        R                  SU5        U$ )NÚOIDC_ENDPOINTzbackend: CAS, endpoint: %s)Úsettingr   ÚloggerÚdebug)ÚselfÚendpoints     ÚJ/var/www/html/env/lib/python3.13/site-packages/social_core/backends/cas.pyÚoidc_endpointÚ"CASOpenIdConnectAuth.oidc_endpoint!   s,   € Ø—<‘< °×1CÑ1CÓDˆÜ‰Ð1°8Ô<Øˆó    c                 óP   • [         R                  SX5        UR                  S5      $ )Nz2backend: CAS, method: get_user_id, details: %s, %sÚusername)r   r   Úget)r   ÚdetailsÚresponses      r   Úget_user_idÚ CASOpenIdConnectAuth.get_user_id&   s$   € Ü‰Ø@À'ô	
ð {‰{˜:Ó&Ð&r   c                 ó˜   • U R                  U R                  5       SSU 30S9n[        R                  SU5        UR	                  S0 5      $ )NÚAuthorizationzBearer )Úheaderszbackend: CAS, user_data: %sÚ
attributes)Úget_jsonÚuserinfo_urlr   r   r   )r   Úaccess_tokenÚargsÚkwargsÚdatas        r   Ú	user_dataÚCASOpenIdConnectAuth.user_data,   sQ   € Ø}‰}Ø×ÑÓ¨/¸WÀ\ÀNÐ;SÐ)Tð ð 
ˆô 	‰Ð2°DÔ9Øx‰x˜ bÓ)Ð)r   c                 óL  • U R                  SU R                  5      n[        R                  SU5        U R	                  UR                  S5      5      nUR                  U5      UR                  S5      UR                  S5      UR                  S5      UR                  S5      S.$ )	NÚUSERNAME_KEYzbackend: CAS, username_key: %sr"   ÚemailÚnameÚ
given_nameÚfamily_name)r   r*   ÚfullnameÚ
first_nameÚ	last_name)r   r)   r   r   r&   r   )r   r   Úusername_keyr   s       r   Úget_user_detailsÚ%CASOpenIdConnectAuth.get_user_details3   s„   € Ø—|‘| N°D×4EÑ4EÓFˆÜ‰Ð5°|ÔDØ—^‘^ H§L¡L°Ó$@ÓAˆ
à"Ÿ™ |Ó4Ø—^‘^ GÓ,Ø"Ÿ™ vÓ.Ø$Ÿ.™.¨Ó6Ø#Ÿ™¨Ó6ñ
ð 	
r   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r+   ÚSTATE_PARAMETERr   r   r&   r2   Ú__static_attributes__r4   r   r   r   r      s'   † ñ
ð €DØ€Oòò
'ò*õ

r   r   )r9   ÚloggingÚopen_id_connectr   Ú	getLoggerr   r   r4   r   r   Ú<module>r?      s/   ðñó å .à	×	Ò	˜8Ó	$€ô,
Ð,õ ,
r   