§
    8?Äjæ
  ã                   ó:   — d Z ddlZddlZddlmZmZ dd„Zdd„ZdS )zEHelper functions for loading data from a Google service account file.é    N)ÚcryptÚ
exceptionsTc                 ót  — t          |�|ng ¦  «        }|                     |                      ¦   «         ¦  «        }|r:t          j        d                     d                     |¦  «        ¦  «        ¦  «        ‚|r t          j         	                    | ¦  «        }nt          j
         	                    | ¦  «        }|S )aØ  Validates a dictionary containing Google service account data.

    Creates and returns a :class:`google.auth.crypt.Signer` instance from the
    private key specified in the data.

    Args:
        data (Mapping[str, str]): The service account data
        require (Sequence[str]): List of keys required to be present in the
            info.
        use_rsa_signer (Optional[bool]): Whether to use RSA signer or EC signer.
            We use RSA signer by default.

    Returns:
        google.auth.crypt.Signer: A signer created from the private key in the
            service account file.

    Raises:
        MalformedError: if the data was in the wrong format, or if one of the
            required keys is missing.
    NzGService account info was not in the expected format, missing fields {}.z, )ÚsetÚ
differenceÚkeysr   ÚMalformedErrorÚformatÚjoinr   Ú	RSASignerÚfrom_service_account_infoÚEsSigner)ÚdataÚrequireÚuse_rsa_signerÚkeys_neededÚmissingÚsigners         úRC:\Projects\Historical\venv\Lib\site-packages\google/auth/_service_account_info.pyÚ	from_dictr      s¬   € õ*  Ð!4�g�g¸"Ñ=Ô=€Kà×$Ò$ T§Y¢Y¡[¤[Ñ1Ô1€Gàð 
ÝÔ'ðßš §	¢	¨'Ñ 2Ô 2Ñ3Ô3ñ
ô 
ð 	
ð ð @Ý”×:Ò:¸4Ñ@Ô@ˆˆå”×9Ò9¸$Ñ?Ô?ˆà€Mó    c                 ó´   — t          j        | dd¬¦  «        5 }t          j        |¦  «        }|t	          |||¬¦  «        fcddd¦  «         S # 1 swxY w Y   dS )aó  Reads a Google service account JSON file and returns its parsed info.

    Args:
        filename (str): The path to the service account .json file.
        require (Sequence[str]): List of keys required to be present in the
            info.
        use_rsa_signer (Optional[bool]): Whether to use RSA signer or EC signer.
            We use RSA signer by default.

    Returns:
        Tuple[ Mapping[str, str], google.auth.crypt.Signer ]: The verified
            info and a signer instance.
    Úrzutf-8)Úencoding)r   r   N)ÚioÚopenÚjsonÚloadr   )Úfilenamer   r   Ú	json_filer   s        r   Úfrom_filenamer!   ?   sµ   € õ 
Œ�˜3¨Ð	1Ñ	1Ô	1ð U°YÝŒy˜Ñ#Ô#ˆØ•Y˜t¨WÀ^ÐTÑTÔTÐTðUð Uð Uð Uñ Uô Uð Uð Uð Uð Uð Uð Uøøøð Uð Uð Uð Uð Uð Us   ˜(AÁAÁA)NT)Ú__doc__r   r   Úgoogle.authr   r   r   r!   © r   r   ú<module>r%      sq   ðð LÐ Kà 	€	€	€	Ø €€€à )Ð )Ð )Ð )Ð )Ð )Ð )Ð )ð%ð %ð %ð %ðPUð Uð Uð Uð Uð Ur   