U
    >i                     @   s\   d dl mZ d dlmZ d dlmZ d dlmZmZ dddee	ee
 ee ddd	ZdS )
    )Optional)HttpRequest)logout)ClientTokenN)post_logout_redirect_uriclient)requestfrom_opr   r   c                C   sR   | j jsd S |r4tjj| j |tjjtjjgd  |rNt	|}t
| | d d S )N)userr   Ztype__in)Zshow_message)r   is_authenticatedr   ZobjectsfilterTypeZACCESS_TOKENZREFRESH_TOKENdeleteboolr   )r	   r
   r   r   Zhas_redirect_uri r   C/tmp/pip-unpacked-wheel-upujnpc2/allauth/idp/oidc/internal/flows.pyrp_initiated_logout	   s    
r   )typingr   Zdjango.httpr   Z%allauth.account.internal.flows.logoutr   Zallauth.idp.oidc.modelsr   r   r   strr   r   r   r   r   <module>   s   