Package com.ibm.fhir.client.impl
Class FHIRBasicAuthenticator
- java.lang.Object
-
- com.ibm.fhir.client.impl.FHIRBasicAuthenticator
-
- All Implemented Interfaces:
javax.ws.rs.client.ClientRequestFilter
public class FHIRBasicAuthenticator extends java.lang.Object implements javax.ws.rs.client.ClientRequestFilter
This class is responsible for adding the Authorization header to outbound REST API requests.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FHIRBasicAuthenticator()
FHIRBasicAuthenticator(java.lang.String user, java.lang.String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
filter(javax.ws.rs.client.ClientRequestContext ctxt)
This method is called by the JAX-RS client runtime and will add an Authorization header to the outbound REST API request to supply the necessary basic auth security token.java.lang.String
getPassword()
java.lang.String
getUsername()
void
setPassword(java.lang.String password)
void
setUsername(java.lang.String username)
-
-
-
Method Detail
-
getUsername
public java.lang.String getUsername()
-
setUsername
public void setUsername(java.lang.String username)
-
getPassword
public java.lang.String getPassword()
-
setPassword
public void setPassword(java.lang.String password)
-
filter
public void filter(javax.ws.rs.client.ClientRequestContext ctxt) throws java.io.IOException
This method is called by the JAX-RS client runtime and will add an Authorization header to the outbound REST API request to supply the necessary basic auth security token.- Specified by:
filter
in interfacejavax.ws.rs.client.ClientRequestFilter
- Throws:
java.io.IOException
-
-