
    !<iF                     2    d dl mZ  G d d          Zd ZdS )    )
json_dumpsc                   .    e Zd ZdZd ZddZddZd ZdS )	KeySetz)This class represents a JSON Web Key Set.c                     || _         d S )Nkeys)selfr   s     /Users/kimhansen/Desktop/03 Workspace/ceo-agents/chl-effectiveness/mcp-servers/whoop/.venv/lib/python3.11/site-packages/authlib/jose/rfc7517/key_set.py__init__zKeySet.__init__   s    			    Fc                 2    dfd| j         D             iS )z5Represent this key as a dict of the JSON Web Key Set.r   c                 ,    g | ]} |j         fi S  )as_dict).0k
is_privateparamss     r
   
<listcomp>z"KeySet.as_dict.<locals>.<listcomp>   s-    LLLQ:8888LLLr   r   )r	   r   r   s    ``r
   r   zKeySet.as_dict
   s)    LLLLL$)LLLMMr   c                 <     | j         |fi |}t          |          S )z(Represent this key set as a JSON string.)r   r   )r	   r   r   objs       r
   as_jsonzKeySet.as_json   s'    dl:0000#r   c                     %t          | j                  dk    r| j        d         S fd| j        D             }|rt          t          |fi |          }|r|d         S t	          d          )zFind the key matches the given kid value.

        :param kid: A string of kid
        :return: Key instance
        :raise: ValueError
        N   r   c                 *    g | ]}|j         k    |S r   )kid)r   keyr   s     r
   r   z&KeySet.find_by_kid.<locals>.<listcomp>   s     ;;;CGsNNNNNr   zKey not found)lenr   list_filter_keys_by_params
ValueError)r	   r   r   r   s    `  r
   find_by_kidzKeySet.find_by_kid   s     ;3ty>>Q..9Q<;;;;ty;;; 	@.t>>v>>??D 	7N)))r   N)F)__name__
__module____qualname____doc__r   r   r   r"   r   r   r
   r   r      sd        33  N N N N   
* * * * *r   r   c              +     K   |                     d          }|                     d          }| D ]P}|j                             d          }|r	|r||k    r'|j                             d          }|r	|r||k    rL|V  Qd S )Nusealg)gettokens)r   r   _use_algr   designed_usedesigned_algs          r
   r    r    (   s      ::eD::eD 	 	z~~e,, 	D 	\T%9%9z~~e,, 	D 	\T%9%9					 	r   N)authlib.common.encodingr   r   r    r   r   r
   <module>r1      sY    . . . . . .!* !* !* !* !* !* !* !*H    r   