
    qh2                     H    S SK Jr  S SKJrJr  S SKJrJrJr  SS jr	SS jr
g)    )mkFilter)discoverDiscoveryFailure)	parseXRDSiterServices	XRDSErrorNc                     [        U 5      n [        UR                  UR                  U5      nUR                  U4$ ! [         a  n[        [        U5      S5      eSnAff = f)aH  Perform the Yadis protocol on the input URL and return an
iterable of resulting endpoint objects.

@param flt: A filter object or something that is convertable to
    a filter object (using mkFilter) that will be used to generate
    endpoint objects. This defaults to generating BasicEndpoint
    objects.

@param input_url: The URL on which to perform the Yadis protocol

@return: The normalized identity URL and an iterable of endpoint
    objects generated by the filter function.

@rtype: (str, [endpoint])

@raises DiscoveryFailure: when Yadis fails to obtain an XRDS document.
N)r   applyFilternormalized_uriresponse_textr   r   str)	input_urlfltresult	endpointserrs        G/var/www/html/env/lib/python3.13/site-packages/openid/yadis/services.pygetServiceEndpointsr      sf    $ i F/ 5 5v7K7K #%	 !!9--  /s3x../s   !< 
A AA c                     [        U5      n[        U5      n/ n[        U5       H#  nUR                  UR	                  X5      5        M%     U$ )aE  Generate an iterable of endpoint objects given this input data,
presumably from the result of performing the Yadis protocol.

@param normalized_uri: The input URL, after following redirects,
    as in the Yadis protocol.


@param xrd_data: The XML text the XRDS file fetched from the
    normalized URI.
@type xrd_data: str

)r   r   r   extendr   )r   xrd_datar   etr   service_elements         r   r
   r
   #   sP     3-C	8	BI'+##ND	F ,     )N)openid.yadis.filtersr   openid.yadis.discoverr   r   openid.yadis.etxrdr   r   r   r   r
    r   r   <module>r      s    * < A A.6r   