MCPcopy
hub / github.com/authlib/authlib / get_op_key

Method get_op_key

authlib/jose/rfc7518/oct_key.py:34–44  ·  view source on GitHub ↗

Get the raw key for the given key_op. This method will also check if the given key_op is supported by this key. :param operation: key operation value, such as "sign", "encrypt". :return: raw key

(self, operation)

Source from the content-addressed store, hash-verified

32 return False
33
34 def get_op_key(self, operation):
35 """Get the raw key for the given key_op. This method will also
36 check if the given key_op is supported by this key.
37
38 :param operation: key operation value, such as "sign", "encrypt".
39 :return: raw key
40 """
41 self.check_key_op(operation)
42 if not self.raw_key:
43 self.load_raw_key()
44 return self.raw_key
45
46 def load_raw_key(self):
47 self.raw_key = urlsafe_b64decode(to_bytes(self.tokens["k"]))

Callers 15

signMethod · 0.45
verifyMethod · 0.45
signMethod · 0.45
verifyMethod · 0.45
signMethod · 0.45
verifyMethod · 0.45
signMethod · 0.45
verifyMethod · 0.45
wrapMethod · 0.45
unwrapMethod · 0.45
wrapMethod · 0.45
unwrapMethod · 0.45

Calls 2

load_raw_keyMethod · 0.95
check_key_opMethod · 0.80