@@ -391,7 +391,8 @@ def _uptodate(self):
391391 def update (self ):
392392 """
393393 Reload the keys if necessary
394- This is a forced update, will happen even if cache time has not elapsed
394+ This is a forced update, will happen even if cache time has not elapsed.
395+
395396 Replaced keys will be marked as inactive and not removed.
396397 """
397398 res = True # An update was successful
@@ -466,7 +467,7 @@ def active_keys(self):
466467
467468 def remove_keys_by_type (self , typ ):
468469 """
469- Remove keys that are of a specific kind or kind and value .
470+ Remove keys that are of a specific type .
470471
471472 :param typ: Type of key (rsa, ec, oct, ..)
472473 """
@@ -481,7 +482,7 @@ def jwks(self, private=False):
481482 Create a JWKS
482483
483484 :param private: Whether private key information should be included.
484- :return: A JWKS representation of the keys in this bundle
485+ :return: A JWKS JSON representation of the keys in this bundle
485486 """
486487 self ._uptodate ()
487488 keys = list ()
@@ -524,7 +525,7 @@ def __len__(self):
524525
525526 def get_key_with_kid (self , kid ):
526527 """
527- Return the key that as specific key ID (kid)
528+ Return the key that has a specific key ID (kid)
528529
529530 :param kid: The Key ID
530531 :return: The key or None
@@ -544,8 +545,9 @@ def get_key_with_kid(self, kid):
544545
545546 def kids (self ):
546547 """
547- Return a list of key IDs. Note that list list may be shorter then
548- the list of keys.
548+ Return a list of key IDs. Note that this list may be shorter then
549+ the list of keys. The reason might be that there are some keys with
550+ no key ID.
549551
550552 :return: A list of all the key IDs that exists in this bundle
551553 """
@@ -595,6 +597,11 @@ def __contains__(self, key):
595597 return key in self ._keys
596598
597599 def copy (self ):
600+ """
601+ Make deep copy of this KeyBundle
602+
603+ :return: The copy
604+ """
598605 kb = KeyBundle ()
599606 kb ._keys = self ._keys [:]
600607
0 commit comments