Package org.kohsuke.github.authorization
Interface AuthorizationProvider
-
- All Known Subinterfaces:
UserAuthorizationProvider
- All Known Implementing Classes:
AuthorizationProvider.AnonymousAuthorizationProvider,GitHub.DependentAuthorizationProvider,ImmutableAuthorizationProvider,JWTTokenProvider,OrgAppInstallationAuthorizationProvider
public interface AuthorizationProviderProvides a functional interface that returns a valid encodedAuthorization. This strategy allows for a provider that dynamically changes the credentials. Each request will request the credentials from the provider.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAuthorizationProvider.AnonymousAuthorizationProviderAAuthorizationProviderthat ensures that no credentials are returned
-
Field Summary
Fields Modifier and Type Field Description static AuthorizationProviderANONYMOUSAn static instance for an ANONYMOUS authorization provider
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetEncodedAuthorization()Returns the credentials to be used with a given request.
-
-
-
Field Detail
-
ANONYMOUS
static final AuthorizationProvider ANONYMOUS
An static instance for an ANONYMOUS authorization provider
-
-
Method Detail
-
getEncodedAuthorization
String getEncodedAuthorization() throws IOException
Returns 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
-
-