Interface InstallationTokenProvider
- All Known Implementing Classes:
GitHubService
Inject as a CDI bean.
NOTE: You generally will not need this bean when processing events,
as clients can be automatically injected into event listener methods,
simply by adding a parameter of type GitHub or DynamicGraphQLClient to the listener method.
This provider is mostly useful for advanced use cases, e.g. when you need to access the GitHub API directly.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface -
Method Summary
Modifier and TypeMethodDescriptiongetInstallationToken(long installationId) Gets a valid installation token for a given application installation.
-
Method Details
-
getInstallationToken
Gets a valid installation token for a given application installation.The token will remain functional a few minutes, so you should discard it after your unit of work and retrieve another one when necessary.
NOTE: You generally will not need this method when processing events, as clients can be automatically injected into event listener listener methods, simply by adding a parameter of type
GitHubto the method. This method can still be useful for advanced use cases, e.g. when you need to access the GitHub API directly.- Returns:
- The client for the given installation.
-