Title: fix: cast JWT iss claim to string for PyJWT 2.12+ compatibility by primetheus · Pull Request #6 · primetheus/fastapi-githubapp · GitHub
Open Graph Title: fix: cast JWT iss claim to string for PyJWT 2.12+ compatibility by primetheus · Pull Request #6 · primetheus/fastapi-githubapp
X Title: fix: cast JWT iss claim to string for PyJWT 2.12+ compatibility by primetheus · Pull Request #6 · primetheus/fastapi-githubapp
Description: Summary Cast self.id to str() in _create_jwt() payload to satisfy PyJWT 2.12+ type enforcement on the iss claim Update test expectation to match Context PyJWT 2.12+ enforces that the iss (issuer) claim must be a string, per RFC 7519 Section 4.1.1 (StringOrURI). Previously self.id (an int from github_app_id) was passed directly, which worked with older PyJWT versions but fails with: TypeError: Issuer (iss) must be a string. Why this is safe Older PyJWT versions accept both int and str for iss — no breakage GitHub's API matches the app ID by value regardless of JSON type (12345 vs "12345") RFC 7519 defines iss as StringOrURI — string is the correct type Test plan Updated test_create_jwt_payload_structure to expect "iss": "123" instead of "iss": 123 Verified PyJWT 2.12.1 accepts the change Verified older PyJWT behavior is unaffected (string is valid in all versions)
Open Graph Description: Summary Cast self.id to str() in _create_jwt() payload to satisfy PyJWT 2.12+ type enforcement on the iss claim Update test expectation to match Context PyJWT 2.12+ enforces that the iss (issuer)...
X Description: Summary Cast self.id to str() in _create_jwt() payload to satisfy PyJWT 2.12+ type enforcement on the iss claim Update test expectation to match Context PyJWT 2.12+ enforces that the iss (issuer)...
Opengraph URL: https://github.com/primetheus/fastapi-githubapp/pull/6
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:cdd20bbe-4e9c-d88b-4cb2-dbddd3e0459d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B52C:245004:621B023:8A8A764:6A574D47 |
| html-safe-nonce | 51f16c078d7f43e7c5fdfa3bc36209071dc6e29c19656759df9170a18fed870d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTJDOjI0NTAwNDo2MjFCMDIzOjhBOEE3NjQ6NkE1NzRENDciLCJ2aXNpdG9yX2lkIjoiMzQwNTA5NzQ2OTAxNzAxNzY3MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 901c934f147840338b57a0270994677ef3bba42a02a0c2413ae46abeb2930661 |
| hovercard-subject-tag | pull_request:3425862152 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/primetheus/fastapi-githubapp/pull/6/files |
| twitter:image | https://avatars.githubusercontent.com/u/865381?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/865381?s=400&v=4 |
| og:image:alt | Summary Cast self.id to str() in _create_jwt() payload to satisfy PyJWT 2.12+ type enforcement on the iss claim Update test expectation to match Context PyJWT 2.12+ enforces that the iss (issuer)... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/primetheus/fastapi-githubapp git https://github.com/primetheus/fastapi-githubapp.git |
| octolytics-dimension-user_id | 865381 |
| octolytics-dimension-user_login | primetheus |
| octolytics-dimension-repository_id | 992328289 |
| octolytics-dimension-repository_nwo | primetheus/fastapi-githubapp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 992328289 |
| octolytics-dimension-repository_network_root_nwo | primetheus/fastapi-githubapp |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 602250ea3b6dd8302a7220ef98adb828dbc807e4 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width