
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
ConstructorsConstructorDescriptionBasicAuthInterceptor(String theCredentialString) BasicAuthInterceptor(String theUsername, String thePassword) -
Method Summary
Modifier and TypeMethodDescriptionvoidinterceptRequest(ca.uhn.fhir.rest.client.api.IHttpRequest theRequest) voidinterceptResponse(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:
interceptRequestin interfaceca.uhn.fhir.rest.client.api.IClientInterceptor
-
interceptResponse
public void interceptResponse(ca.uhn.fhir.rest.client.api.IHttpResponse theResponse) throws IOException - Specified by:
interceptResponsein interfaceca.uhn.fhir.rest.client.api.IClientInterceptor- Throws:
IOException
-