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 requestsSee the HAPI Documentation for information on how to use this class.
-
-
Constructor Summary
Constructors Constructor Description BasicAuthInterceptor(String theCredentialString)BasicAuthInterceptor(String theUsername, String thePassword)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinterceptRequest(ca.uhn.fhir.rest.client.api.IHttpRequest theRequest)voidinterceptResponse(ca.uhn.fhir.rest.client.api.IHttpResponse theResponse)
-
-
-
Constructor Detail
-
BasicAuthInterceptor
public BasicAuthInterceptor(String theUsername, String thePassword)
- Parameters:
theUsername- The usernamethePassword- The password
-
BasicAuthInterceptor
public BasicAuthInterceptor(String theCredentialString)
- Parameters:
theCredentialString- A credential string in the formatusername:password
-
-
Method Detail
-
interceptRequest
public void interceptRequest(ca.uhn.fhir.rest.client.api.IHttpRequest theRequest)
- 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
-
-