Package org.kohsuke.github.authorization
Class OrgAppInstallationAuthorizationProvider
- java.lang.Object
-
- org.kohsuke.github.GitHub.DependentAuthorizationProvider
-
- org.kohsuke.github.authorization.OrgAppInstallationAuthorizationProvider
-
- All Implemented Interfaces:
AuthorizationProvider
public class OrgAppInstallationAuthorizationProvider extends GitHub.DependentAuthorizationProvider
Provides an AuthorizationProvider that performs automatic token refresh.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.kohsuke.github.authorization.AuthorizationProvider
AuthorizationProvider.AnonymousAuthorizationProvider
-
-
Field Summary
-
Fields inherited from interface org.kohsuke.github.authorization.AuthorizationProvider
ANONYMOUS
-
-
Constructor Summary
Constructors Constructor Description OrgAppInstallationAuthorizationProvider(String organizationName, AuthorizationProvider authorizationProvider)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetEncodedAuthorization()Returns the credentials to be used with a given request.-
Methods inherited from class org.kohsuke.github.GitHub.DependentAuthorizationProvider
gitHub
-
-
-
-
Constructor Detail
-
OrgAppInstallationAuthorizationProvider
@BetaApi @Deprecated public OrgAppInstallationAuthorizationProvider(String organizationName, AuthorizationProvider authorizationProvider)
Deprecated.Provides an AuthorizationProvider that performs automatic token refresh, based on an previously authenticated github client.- Parameters:
organizationName- The name of the organization where the application is installedauthorizationProvider- A authorization provider that returns a JWT token that can be used to refresh the App Installation token from GitHub.
-
-
Method Detail
-
getEncodedAuthorization
public String getEncodedAuthorization() throws IOException
Description copied from interface:AuthorizationProviderReturns the credentials to be used with a given request. As an example, a authorization provider for a bearer token will return something like:@Override public String getEncodedAuthorization() { return "Bearer myBearerToken"; }- Returns:
- encoded authorization string, can be null
- Throws:
IOException- on any error that prevents the provider from getting a valid authorization
-
-