Package org.labkey.remoteapi
Interface CredentialsProvider
- All Known Implementing Classes:
ApiKeyCredentialsProvider,BasicAuthCredentialsProvider,GuestCredentialsProvider,NetrcCredentialsProvider
public interface CredentialsProvider
-
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureClientBuilder(URI baseURI, org.apache.hc.client5.http.impl.classic.HttpClientBuilder builder) voidconfigureRequest(URI baseURI, org.apache.hc.client5.http.classic.methods.HttpUriRequest request, org.apache.hc.client5.http.protocol.HttpClientContext httpClientContext) voidinitializeConnection(Connection connection) Initialize the connection before its first request.default booleanshouldRetryRequest(CommandException exception, org.apache.hc.client5.http.classic.methods.HttpUriRequest request) Should the Command attempt to retry the request?
-
Method Details
-
configureClientBuilder
void configureClientBuilder(URI baseURI, org.apache.hc.client5.http.impl.classic.HttpClientBuilder builder) -
configureRequest
void configureRequest(URI baseURI, org.apache.hc.client5.http.classic.methods.HttpUriRequest request, org.apache.hc.client5.http.protocol.HttpClientContext httpClientContext) throws org.apache.hc.client5.http.auth.AuthenticationException - Throws:
org.apache.hc.client5.http.auth.AuthenticationException
-
initializeConnection
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.- Throws:
IOExceptionCommandException
-
shouldRetryRequest
default boolean shouldRetryRequest(CommandException exception, org.apache.hc.client5.http.classic.methods.HttpUriRequest request) Should the Command attempt to retry the request?
-