Module org.kohsuke.github.api
Package org.kohsuke.github.authorization
Class AnonymousAuthorizationProvider
java.lang.Object
org.kohsuke.github.authorization.AnonymousAuthorizationProvider
- All Implemented Interfaces:
AuthorizationProvider
A
AuthorizationProvider
that returns an empty authorization.
This will result in the "Authorization" header not being added to a request.
-
Field Summary
Fields inherited from interface org.kohsuke.github.authorization.AuthorizationProvider
ANONYMOUS
-
Constructor Summary
ConstructorDescriptionCreate default AnonymousAuthorizationProvider instance -
Method Summary
Modifier and TypeMethodDescriptionReturns the credentials to be used with a given request.
-
Constructor Details
-
AnonymousAuthorizationProvider
public AnonymousAuthorizationProvider()Create default AnonymousAuthorizationProvider instance
-
-
Method Details
-
getEncodedAuthorization
Description copied from interface:AuthorizationProvider
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"; }
- Specified by:
getEncodedAuthorization
in interfaceAuthorizationProvider
- Returns:
- encoded authorization string, can be null
- Throws:
IOException
- on any error that prevents the provider from returning a valid authorization
-