403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/openid/extensions/draft/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/openid/extensions/draft/__pycache__/pape2.cpython-311.pyc
�

|=�^
%���dZgd�ZddlmZddlZdZdZdZdZej	d	��Z
Gd
�de��Zee_Gd�d
e��Zee_dS)z�An implementation of the OpenID Provider Authentication Policy
Extension 1.0

@see: http://openid.net/developers/specs/

@since: 2.1.0
)�Request�Response�ns_uri�AUTH_PHISHING_RESISTANT�AUTH_MULTI_FACTOR�AUTH_MULTI_FACTOR_PHYSICAL�)�	ExtensionNz+http://specs.openid.net/extensions/pape/1.0zEhttp://schemas.openid.net/pape/policies/2007/06/multi-factor-physicalz<http://schemas.openid.net/pape/policies/2007/06/multi-factorzBhttp://schemas.openid.net/pape/policies/2007/06/phishing-resistantz$^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\dZ$c�b��eZdZdZdZd�fd�	Zd�Zd�Zd�Zd�Z	e
e	��Z	d	�Zd
�Z�xZ
S)ra�A Provider Authentication Policy request, sent from a relying
    party to a provider

    @ivar preferred_auth_policies: The authentication policies that
        the relying party prefers
    @type preferred_auth_policies: [str]

    @ivar max_auth_age: The maximum time, in seconds, that the relying
        party wants to allow to have elapsed before the user must
        re-authenticate
    @type max_auth_age: int or NoneType
    �papeNc�z��tt|�����|sg}||_||_dS�N)�superr�__init__�preferred_auth_policies�max_auth_age)�selfrr�	__class__s   ��?/usr/lib/python3/dist-packages/openid/extensions/draft/pape2.pyrzRequest.__init__1sC���
�g�t���%�%�'�'�'�&�	)�&(�#�'>��$�(�����c�<�t|jp|jdu��Sr
)�boolrr)rs r�__bool__zRequest.__bool__9s)���D�0�2��%�T�1�3�3�	3rc�P�||jvr|j�|��dSdS)a�Add an acceptable authentication policy URI to this request

        This method is intended to be used by the relying party to add
        acceptable authentication types to the request.

        @param policy_uri: The identifier for the preferred type of
            authentication.
        @see: http://openid.net/specs/openid-provider-authentication-policy-extension-1_0-01.html#auth_policies
        N)r�append�r�
policy_uris  r�addPolicyURIzRequest.addPolicyURI=s7���T�9�9�9��(�/�/�
�;�;�;�;�;�:�9rc�z�dd�|j��i}|j�t|j��|d<|S)�/@see: C{L{Extension.getExtensionArgs}}
        r� Nr)�joinrr�str�r�ns_argss  r�getExtensionArgszRequest.getExtensionArgsJsD��
&�s�x�x��0L�'M�'M�
����(�&)�$�*;�&<�&<�G�N�#��rc��|��}|j�|j��}|ikrdS|�|��|S)zaInstantiate a Request object from the arguments in a
        C{checkid_*} OpenID message
        N)�message�getArgsr�parseExtensionArgs)�cls�requestr�argss    r�fromOpenIDRequestzRequest.fromOpenIDRequestVsM���s�u�u����&�&�t�{�3�3���2�:�:��4�����%�%�%��rc��g|_|�d��}|rat|t��rt	|d���}|�d��D]%}||jvr|j�|���&|�d��}d|_|r(	t|��|_dS#t$rYdSwxYwdS)aSet the state of this request to be that expressed in these
        PAPE arguments

        @param args: The PAPE arguments without a namespace

        @rtype: None

        @raises ValueError: When the max_auth_age is not parseable as
            an integer
        rzutf-8)�encodingr rN)
r�get�
isinstance�bytesr"�splitrr�int�
ValueError)rr,�policies_str�uri�max_auth_age_strs     rr)zRequest.parseExtensionArgses���(*��$��x�x� 9�:�:���	=��,��.�.�
C�"�<�'�B�B�B��#�)�)�#�.�.�
=�
=���d�:�:�:��0�7�7��<�<�<�� �8�8�N�3�3�� ����	�
�$'�(8�$9�$9��!�!�!���
�
�
����
����	�	s�B5�5
C�Cc�P�tt|jj|����S)a�Given a list of authentication policy URIs that a provider
        supports, this method returns the subsequence of those types
        that are preferred by the relying party.

        @param supported_types: A sequence of authentication policy
            type URIs that are supported by a provider

        @returns: The sub-sequence of the supported types that are
            preferred by the relying party. This list will be ordered
            in the order that the types appear in the supported_types
            sequence, and may be empty if the provider does not prefer
            any of the supported authentication types.

        @returntype: [str]
        )�list�filterr�__contains__)r�supported_typess  r�preferredTypeszRequest.preferredTypes�s,�� ��4�/�<�o�N�N�P�P�	Pr)NN)�__name__�
__module__�__qualname__�__doc__�ns_aliasrrrr%r-�classmethodr)r>�
__classcell__�rs@rrr!s�����������H�)�)�)�)�)�)�3�3�3�<�<�<�
�
�
����$��$5�6�6�����BP�P�P�P�P�P�Prrc�^��eZdZdZdZ			d
�fd�	Zd�Zd�Zdd�Ze	e��Zd	�Z
�xZS)rz[A Provider Authentication Policy response, sent from a provider
    to a relying party
    rNc���tt|�����|r||_ng|_||_||_dSr
)rrr�
auth_policies�	auth_time�nist_auth_level)rrIrJrKrs    �rrzResponse.__init__�sQ���	�h����&�&�(�(�(��	$�!.�D���!#�D��"���.����rc�P�||jvr|j�|��dSdS)a�Add a authentication policy to this response

        This method is intended to be used by the provider to add a
        policy that the provider conformed to when authenticating the user.

        @param policy_uri: The identifier for the preferred type of
            authentication.
        @see: http://openid.net/specs/openid-provider-authentication-policy-extension-1_0-01.html#auth_policies
        N)rIrrs  rrzResponse.addPolicyURI�s7���T�/�/�/���%�%�j�1�1�1�1�1�0�/rc��|��}|�|j��}|�|�|��|SdS)a9Create a C{L{Response}} object from a successful OpenID
        library response
        (C{L{openid.consumer.consumer.SuccessResponse}}) response
        message

        @param success_response: A SuccessResponse from consumer.complete()
        @type success_response: C{L{openid.consumer.consumer.SuccessResponse}}

        @rtype: Response or None
        @returns: A provider authentication policy response from the
            data that was supplied with the C{id_res} response or None
            if the provider sent no signed PAPE response arguments.
        N)�getSignedNSrr))r*�success_responserr,s    r�fromSuccessResponsezResponse.fromSuccessResponse�sL���s�u�u�� �+�+�D�K�8�8�����#�#�D�)�)�)��K��4rFc���|�d��}|r |dkr|�d��|_|�d��}|rP	t|��}d|cxkrdkr
nn0||_n(#t
$r|rtd���d|_YnwxYw|�d	��}|r4t�|��r	||_dS|rtd
���dSdS)a�Parse the provider authentication policy arguments into the
        internal state of this object

        @param args: unqualified provider authentication policy
            arguments

        @param strict: Whether to raise an exception when bad data is
            encountered

        @returns: None. The data is parsed into the internal fields of
            this object.
        rI�noner rKr��Cnist_auth_level must be an integer between zero and four, inclusiveNrJ�#auth_time must be in RFC3339 format)	r0r3rIr4rKr5�TIME_VALIDATOR�matchrJ)rr,�strictr6�nist_level_str�
nist_levelrJs       rr)zResponse.parseExtensionArgs�sP���x�x��0�0���	9�L�F�2�2�!-�!3�!3�C�!8�!8�D�����"3�4�4���	6�
6� ��0�0�
��
�&�&�&�&�Q�&�&�&�&�&�+5�D�(����
0�
0�
0��0�$�3�4�4�4�,0�D�(�(�(�

0�����H�H�[�)�)�	��	H��#�#�I�.�.�
H�!*������
H� �!F�G�G�G�		H�	H�
H�
Hs�A7�7"B�Bc��t|j��dkrddi}ndd�|j��i}|j�J|jt	tdd����vrt
d���t|j��|d<|j�8t�
|j��st
d	���|j|d
<|S)rrrIrRr NrSrTrKrUrJ)�lenrIr!rKr:�ranger5r"rJrVrWr#s  rr%zResponse.getExtensionArgss����t�!�"�"�a�'�'����G�G�
 ����$�*<�!=�!=��G���+��#�4��a����+<�+<�<�<� �"<�=�=�=�),�T�-A�)B�)B�G�%�&��>�%�!�'�'���7�7�
H� �!F�G�G�G�#'�>�G�K� ��r)NNN)F)r?r@rArBrCrrrPr)rDr%rErFs@rrr�s�����������H� $��!%�/�/�/�/�/�/�2�2�2����6%H�%H�%H�%H�N&�+�&9�:�:��������rr)
rB�__all__�openid.extensionr	�rerrrr�compilerVrr�rr�<module>rcs���������'�&�&�&�&�&�	�	�	�	�	6��L��C��I�����B�C�C��vP�vP�vP�vP�vP�i�vP�vP�vP�r���}�}�}�}�}�y�}�}�}�@����r

Youez - 2016 - github.com/yon3zu
LinuXploit