Closed ffalor closed 2 years ago
Adds jwt_token attribute to GhApi to allow users to call app endpoints that require a jwt token instead of a pat/access_key
jwt_token
GhApi
closes #85
This should allow you to authenticate to the following endpoints:
And probably more, these were just the ones I quickly tested.
For example:
jwt = create_jwt(app_id, private_key) app_api = GhApi(jwt_token=jwt) print("List Installations") installations = app_api.apps.list_installations() print(installations) print("Get Access Token") id = installations[0]['id'] print(app_api.apps.create_installation_access_token(id))
List Installations [- id: 1111 - account: - login: ffalor - id: 1 - node_id: MDQ6VXNlcjM1MTQ0MTQx #etc...] Get Access Token - token: ghs_324324234234 - expires_at: 2021-08-21T11:40:36Z - permissions: - administration: read - contents: read - issues: write - metadata: read - repository_selection: all
Not 100% what all I can update since from my understanding this project is auto generated. I did not see any tests to update. Please let me know what would need to change in order to add the ability to provide a jwt_token.
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Adds
jwt_token
attribute toGhApi
to allow users to call app endpoints that require a jwt token instead of a pat/access_keycloses #85
This should allow you to authenticate to the following endpoints:
And probably more, these were just the ones I quickly tested.
For example:
Not 100% what all I can update since from my understanding this project is auto generated. I did not see any tests to update. Please let me know what would need to change in order to add the ability to provide a jwt_token.