MCPcopy Index your code
hub / github.com/authlib/authlib / _sign

Function _sign

authlib/oauth2/rfc7523/assertion.py:62–84  ·  view source on GitHub ↗
(key, client_id, token_endpoint, alg, claims=None, **kwargs)

Source from the content-addressed store, hash-verified

60
61
62def _sign(key, client_id, token_endpoint, alg, claims=None, **kwargs):
63 # REQUIRED. Issuer. This MUST contain the client_id of the OAuth Client.
64 issuer = client_id
65 # REQUIRED. Subject. This MUST contain the client_id of the OAuth Client.
66 subject = client_id
67 # The Audience SHOULD be the URL of the Authorization Server's Token Endpoint.
68 audience = token_endpoint
69
70 # jti is required
71 if claims is None:
72 claims = {}
73 if "jti" not in claims:
74 claims["jti"] = generate_token(36)
75
76 return sign_jwt_bearer_assertion(
77 key=key,
78 issuer=issuer,
79 audience=audience,
80 subject=subject,
81 claims=claims,
82 alg=alg,
83 **kwargs,
84 )

Callers 3

client_secret_jwt_signFunction · 0.85
private_key_jwt_signFunction · 0.85
serialize_jsonMethod · 0.85

Calls 2

generate_tokenFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…