Class BasicAuthInterceptor
java.lang.Object
ca.uhn.fhir.rest.client.interceptor.BasicAuthInterceptor
- All Implemented Interfaces:
ca.uhn.fhir.rest.client.api.IClientInterceptor
public class BasicAuthInterceptor
extends Object
implements ca.uhn.fhir.rest.client.api.IClientInterceptor
HTTP interceptor to be used for adding HTTP basic auth username/password tokens
to requests
See the HAPI Documentation for information on how to use this class.
-
Constructor Summary
ConstructorDescriptionBasicAuthInterceptor
(String theCredentialString) BasicAuthInterceptor
(String theUsername, String thePassword) -
Method Summary
Modifier and TypeMethodDescriptionvoid
interceptRequest
(ca.uhn.fhir.rest.client.api.IHttpRequest theRequest) void
interceptResponse
(ca.uhn.fhir.rest.client.api.IHttpResponse theResponse)
-
Constructor Details
-
BasicAuthInterceptor
- Parameters:
theUsername
- The usernamethePassword
- The password
-
BasicAuthInterceptor
- Parameters:
theCredentialString
- A credential string in the formatusername:password
-
-
Method Details
-
interceptRequest
- Specified by:
interceptRequest
in interfaceca.uhn.fhir.rest.client.api.IClientInterceptor
-
interceptResponse
public void interceptResponse(ca.uhn.fhir.rest.client.api.IHttpResponse theResponse) throws IOException - Specified by:
interceptResponse
in interfaceca.uhn.fhir.rest.client.api.IClientInterceptor
- Throws:
IOException
-