Package org.labkey.remoteapi
Class ApiKeyCredentialsProvider
java.lang.Object
org.labkey.remoteapi.ApiKeyCredentialsProvider
- All Implemented Interfaces:
CredentialsProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureClientBuilder
(URI baseURI, org.apache.hc.client5.http.impl.classic.HttpClientBuilder builder) void
configureRequest
(URI baseURI, org.apache.hc.client5.http.classic.methods.HttpUriRequest request, org.apache.hc.client5.http.protocol.HttpClientContext httpClientContext) void
initializeConnection
(Connection connection) Initialize the connection before its first request.boolean
shouldRetryRequest
(CommandException exception, org.apache.hc.client5.http.classic.methods.HttpUriRequest request) Should the Command attempt to retry the request?
-
Constructor Details
-
ApiKeyCredentialsProvider
-
-
Method Details
-
configureClientBuilder
public void configureClientBuilder(URI baseURI, org.apache.hc.client5.http.impl.classic.HttpClientBuilder builder) - Specified by:
configureClientBuilder
in interfaceCredentialsProvider
-
configureRequest
public void configureRequest(URI baseURI, org.apache.hc.client5.http.classic.methods.HttpUriRequest request, org.apache.hc.client5.http.protocol.HttpClientContext httpClientContext) - Specified by:
configureRequest
in interfaceCredentialsProvider
-
initializeConnection
Description copied from interface:CredentialsProvider
Initialize the connection before its first request. For example, make a request to retrieve CSRF token & session ID and/or ensure the user is logged in.- Specified by:
initializeConnection
in interfaceCredentialsProvider
- Throws:
IOException
CommandException
-
shouldRetryRequest
public boolean shouldRetryRequest(CommandException exception, org.apache.hc.client5.http.classic.methods.HttpUriRequest request) Description copied from interface:CredentialsProvider
Should the Command attempt to retry the request?- Specified by:
shouldRetryRequest
in interfaceCredentialsProvider
-