(self, payload: dict)
| 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 | |
| 205 | class AppAuth(JWT): |