
    v
                         d Z  G d de      Z G d de      Z G d de      Z G d de      Z G d	 d
e      Z G d de      Z G d de      Zy)z2A module that provides rapt authentication errors.c                       e Zd ZdZy)ReauthErrorz$Base exception for reauthentication.N)__name__
__module____qualname____doc__     /platform/bq/third_party/google_reauth/errors.pyr   r      s    .r	   r   c                   $     e Zd ZdZd fd	Z xZS )HttpAccessTokenRefreshErrorzCError (with HTTP status) trying to refresh an expired access token.c                 :    t         t        |   |       || _        y N)superr   __init__statusselfmessager   	__class__s      r
   r   z$HttpAccessTokenRefreshError.__init__   s    )49'Br	   r   r   r   r   r   r   __classcell__r   s   @r
   r   r      s    M r	   r   c                   "     e Zd ZdZ fdZ xZS )ReauthUnattendedErrorz0An exception for when reauth cannot be answered.c                 ,    t         t        |   d       y )Nz_Reauthentication challenge could not be answered because you are not in an interactive session.)r   r   r   r   r   s    r
   r   zReauthUnattendedError.__init__!   s    #T3-	.r	   r   r   s   @r
   r   r      s    :. .r	   r   c                   $     e Zd ZdZd fd	Z xZS )ReauthFailErrorz$An exception for when reauth failed.c                 J    t         t        |   dj                  |             y )Nz&Reauthentication challenge failed. {0})r   r   r   format)r   r   r   s     r
   r   zReauthFailError.__init__*   s!    ot-4;;GD	Fr	   r   r   r   s   @r
   r   r   '   s    .F Fr	   r   c                   "     e Zd ZdZ fdZ xZS )ReauthAPIErrorzDAn exception for when reauth API returned something we can't handle.c                 J    t         t        |   dj                  |             y )Nz8Reauthentication challenge failed due to API error: {0}.)r   r"   r   r    )r   	api_errorr   s     r
   r   zReauthAPIError.__init__2   s#    nd,FMM	r	   r   r   s   @r
   r"   r"   /   s    N r	   r"   c                   $     e Zd ZdZd fd	Z xZS )ReauthAccessTokenRefreshErrorz>An exception for when we can't get an access token for reauth.c                 X    t         t        |   dj                  |             || _        y )Nz7Failed to get an access token for reauthentication. {0})r   r&   r   r    r   r   s      r
   r   z&ReauthAccessTokenRefreshError.__init__;   s-    +T;ELL	 r	   )NNr   r   s   @r
   r&   r&   8   s    H r	   r&   c                   "     e Zd ZdZ fdZ xZS )ReauthSamlLoginRequiredErrorzAn exception for when web login is required to complete reauth.

    This applies to SAML users who are required to login through their IDP to
    complete reauth.
    c                 ,    t         t        |   d       y )NzLSAML login is required for the current account to complete reauthentication.)r   r)   r   r   s    r
   r   z%ReauthSamlLoginRequiredError.__init__I   s    *D: 	!r	   r   r   s   @r
   r)   r)   B   s    ! !r	   r)   N)	r   	Exceptionr   r   r   r   r"   r&   r)   r   r	   r
   <module>r,      s`    9	) 	
) .K .Fk F[ K 
!; 
!r	   