Class FHIRBasicAuthenticator

  • All Implemented Interfaces:
    javax.ws.rs.client.ClientRequestFilter

    public class FHIRBasicAuthenticator
    extends Object
    implements javax.ws.rs.client.ClientRequestFilter
    This class is responsible for adding the Authorization header to outbound REST API requests.
    • Constructor Detail

      • FHIRBasicAuthenticator

        protected FHIRBasicAuthenticator()
      • FHIRBasicAuthenticator

        public FHIRBasicAuthenticator​(String user,
                                      String password)
    • Method Detail

      • getUsername

        public String getUsername()
      • setUsername

        public void setUsername​(String username)
      • getPassword

        public String getPassword()
      • setPassword

        public void setPassword​(String password)
      • filter

        public void filter​(javax.ws.rs.client.ClientRequestContext ctxt)
                    throws 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 interface javax.ws.rs.client.ClientRequestFilter
        Throws:
        IOException