MCPcopy
hub / github.com/authlib/authlib / sign

Method sign

authlib/oauth2/rfc7523/auth.py:104–116  ·  view source on GitHub ↗
(self, auth, token_endpoint)

Source from the content-addressed store, hash-verified

102 alg = "RS256"
103
104 def sign(self, auth, token_endpoint):
105 if isinstance(auth.client_secret, (RSAKey, ECKey, OKPKey)):
106 key = auth.client_secret
107 else:
108 key = RSAKey.import_key(auth.client_secret)
109 return private_key_jwt_sign(
110 key,
111 client_id=auth.client_id,
112 token_endpoint=token_endpoint,
113 claims=self.claims,
114 header=self.headers,
115 alg=self.alg,
116 )

Callers 2

test_sign_with_ec_keyFunction · 0.95

Calls 2

private_key_jwt_signFunction · 0.85
import_keyMethod · 0.45

Tested by 2

test_sign_with_ec_keyFunction · 0.76