Interface HttpAuthorizationProvider
-
- All Known Implementing Classes:
BasicHttpAlwaysInHeaderAuthorizationProvider
,BasicHttpAuthorizationProvider
,NoAuthHttpAuthorizationProvider
,OAuth2AuthorizationProvider
public interface HttpAuthorizationProvider
Provides the information required to authenticate an HTTP request with an authorization method in particular. Classes extending this class must be annotated withHttpAuthorizationMethod
to declare the authorization it implements.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
handleRequestRetry(int statusCode)
This method allows to execute additional actions required by the authorization method before retrying a request for which an error response is received.void
init(HttpExternalSystemData configuration)
Initializes the required information based on the provided configuration
-
-
-
Method Detail
-
init
void init(HttpExternalSystemData configuration)
Initializes the required information based on the provided configuration- Parameters:
configuration
- Provides the configuration data of an HTTP protocol based external system
-
handleRequestRetry
default boolean handleRequestRetry(int statusCode)
This method allows to execute additional actions required by the authorization method before retrying a request for which an error response is received. It also allows to skip the retry if needed by using the returned value: if true is returned then the retry is done and if false is returned then no retry is attempted.- Parameters:
statusCode
- The status code of the external system response- Returns:
- true if it is necessary to retry the connection with the External System or false to skip the retry
-
-