You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The client will manage the generation of JWT tokens, as well as requesting and caching the installation tokens from GitHub.
I see that there is a hash map for the installation tokens, but I couldn't figure out how to make the client object remember more than one token.
Here is what I tried to do:
create a new github client instance with the private key and app id combo
periodically (1 minute) Iterate through a list of repositories that are all under the same installation
2.1. get the installation id for the repository with: client.createRepositoryClient(owner, repo).createGithubAppClient().getInstallation().get().id()
2.2 use GitHubClient.scopeForInstallationId(...) to authenticate as an installation and this is where the library checks for the installation token and I see the following in the logs Github token for installation 14XXXXXX is either expired or null. Trying to get a new one. for every repository in every iteration.
After looking at the code, I'm not sure how the caching should work when the scopeForInstallationId(...) returns a new GitHubClient instance so I assume the hash map with the installation tokens will be empty.
I'm not very good with java so my assumption is I'm doing something wrong, can you give me some pointers?
The text was updated successfully, but these errors were encountered:
The readme says:
I see that there is a hash map for the installation tokens, but I couldn't figure out how to make the client object remember more than one token.
Here is what I tried to do:
2.1. get the installation id for the repository with:
client.createRepositoryClient(owner, repo).createGithubAppClient().getInstallation().get().id()
2.2 use
GitHubClient.scopeForInstallationId(...)
to authenticate as an installation and this is where the library checks for the installation token and I see the following in the logsGithub token for installation 14XXXXXX is either expired or null. Trying to get a new one.
for every repository in every iteration.After looking at the code, I'm not sure how the caching should work when the
scopeForInstallationId(...)
returns a newGitHubClient
instance so I assume the hash map with the installation tokens will be empty.I'm not very good with java so my assumption is I'm doing something wrong, can you give me some pointers?
The text was updated successfully, but these errors were encountered: