Package com.stripe.net
Interface Authenticator
- All Known Implementing Classes:
BearerTokenAuthenticator
public interface Authenticator
Interface for applying authentication to a request. This is used by
StripeResponseGetter
to apply authentication to requests before they are sent. Implementations of this interface
should not modify the request in-place, but should instead return a new request with the
appropriate authentication headers applied. The default implementation of this interface is
BearerTokenAuthenticator, which applies the API key as a Bearer token in the
Authorization header. Users can also implement this interface to provide custom authentication
logic, often by wrapping the BearerTokenAuthenticator and applying additional headers or logic as
needed.-
Method Summary
-
Method Details
-
authenticate
* Authenticate the request- Parameters:
request- the request that need authentication.- Returns:
- the request with authentication headers applied.
- Throws:
StripeException- on authentication errors.
-