MCPcopy
hub / github.com/authlib/authlib / import_key_set

Method import_key_set

authlib/jose/rfc7517/jwk.py:47–56  ·  view source on GitHub ↗

Import KeySet from string, dict or a list of keys. :return: KeySet instance

(cls, raw)

Source from the content-addressed store, hash-verified

45
46 @classmethod
47 def import_key_set(cls, raw):
48 """Import KeySet from string, dict or a list of keys.
49
50 :return: KeySet instance
51 """
52 raw = _transform_raw_key(raw)
53 if isinstance(raw, dict) and "keys" in raw:
54 keys = raw.get("keys")
55 return KeySet([cls.import_key(k) for k in keys])
56 raise ValueError("Invalid key set format")
57
58
59def _transform_raw_key(raw):

Callers 14

import_any_keyFunction · 0.80
validate_jwksMethod · 0.80
loadsFunction · 0.80
get_algorithmsMethod · 0.80
parse_id_tokenMethod · 0.80
parse_id_tokenMethod · 0.80
create_id_tokenFunction · 0.80
jwksFunction · 0.80
test_jwk_import_key_setFunction · 0.80

Calls 4

_transform_raw_keyFunction · 0.85
KeySetClass · 0.85
getMethod · 0.45
import_keyMethod · 0.45

Tested by 7

create_id_tokenFunction · 0.64
jwksFunction · 0.64
test_jwk_import_key_setFunction · 0.64