MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / JwtSigner

Class JwtSigner

github/Auth.py:192–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190
191
192class JwtSigner:
193 def __init__(self, private_key_or_func: str | PrivateKeyGenerator, jwt_algorithm: str):
194 self._private_key_or_func = private_key_or_func
195 self._jwt_algorithm = jwt_algorithm
196
197 def jwt_sign(self, payload: dict) -> str | bytes:
198 if callable(self._private_key_or_func):
199 private_key = self._private_key_or_func()
200 else:
201 private_key = self._private_key_or_func
202 return jwt.encode(payload, key=private_key, algorithm=self._jwt_algorithm)
203
204
205class AppAuth(JWT):

Callers 1

create_jwt_signMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…