public class NetrcCredentialsProvider extends java.lang.Object implements CredentialsProvider
Constructor and Description |
---|
NetrcCredentialsProvider(java.lang.String host)
Attempt netrc lookup for the given host.
|
NetrcCredentialsProvider(java.net.URI baseURI)
Attempt netrc lookup for the URI's host.
|
Modifier and Type | Method and Description |
---|---|
void |
configureRequest(java.lang.String baseUrl,
org.apache.http.client.methods.HttpUriRequest request,
org.apache.http.client.protocol.HttpClientContext httpClientContext) |
public NetrcCredentialsProvider(java.net.URI baseURI) throws java.io.IOException
baseURI
- A valid base URI from which we'll extract the host name.java.io.IOException
- if there is an IO problem reading from the netrc filepublic NetrcCredentialsProvider(java.lang.String host) throws java.io.IOException
host
- Just the host name, e.g., "www.labkey.org" or "localhost"java.io.IOException
- if there is an IO problem reading from the netrc filepublic void configureRequest(java.lang.String baseUrl, org.apache.http.client.methods.HttpUriRequest request, org.apache.http.client.protocol.HttpClientContext httpClientContext) throws org.apache.http.auth.AuthenticationException, java.net.URISyntaxException
configureRequest
in interface CredentialsProvider
org.apache.http.auth.AuthenticationException
java.net.URISyntaxException