--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/b8273f38-140f-43ec-95db-7e369b7a27aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
What I have tried, but didn't work is the following:
FhirContext fhirContext = FhirContext.forDstu2Hl7Org();
SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(new File(TRUSTSTORE_LOCATION), TRUSTSTORE_PASSWORD.toCharArray()).build();
SslAwareApacheRestfulClientFactory factory = new SslAwareApacheRestfulClientFactory(fhirContext);
factory.setSecurityInformation(new FhirSecurityInformation(true, sslContext, null, username, password));
BasicAuthInterceptor authInterceptor = new BasicAuthInterceptor(username, password);
IGenericClient client = factory.newGenericClient(serviceUrl); // https://hostname/fhir
client.registerInterceptor(authInterceptor);
fhirContext.setRestfulClientFactory(factory);
return fhirContext;
I am looking forward to your response.
Thanks.
Hi there,To create a client which uses basic auth, you need to use the BasicAuthInterceptor. There is an example here: http://hapifhir.io/doc_rest_client_interceptor.html#Security_HTTP_Basic_AuthorizationCheers,James
On Mon, Jun 19, 2017 at 11:44 AM, deHund <goo...@sven-haag.de> wrote:
Hi, I like to add BASIC auth in SSL context using Tomcat Application Server.
The Tomcat's web.xml is configured for BASIC auth and the Tomcat Connector has SSLEnabled=true.
A Truststore would be available if necessary.
Basic Auth works in the browser against FHIR Server.
Any hint is appreciated. Thanks.
--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/eb690537-c854-4e52-876f-c01f67cfda6c%40googlegroups.com.
For SSL keystore and truststore are required. Though, if you could provide a, sort of self contained, example it would really help me out. Thanks.
--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/44dfe639-e5f8-424a-85ca-1af6a4a44417%40googlegroups.com.
On Tue, Jun 20, 2017 at 7:11 AM, deHund <goo...@sven-haag.de> wrote:
For SSL keystore and truststore are required. Though, if you could provide a, sort of self contained, example it would really help me out. Thanks.--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi...@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/6c9f9a3a-0da4-48d1-bbbd-d003c623f681%40googlegroups.com.
Hi there,To create a client which uses basic auth, you need to use the BasicAuthInterceptor. There is an example here: http://hapifhir.io/doc_rest_client_interceptor.html#Security_HTTP_Basic_AuthorizationCheers,JamesOn Mon, Jun 19, 2017 at 11:44 AM, deHund <goo...@sven-haag.de> wrote:Hi, I like to add BASIC auth in SSL context using Tomcat Application Server.
The Tomcat's web.xml is configured for BASIC auth and the Tomcat Connector has SSLEnabled=true.
A Truststore would be available if necessary.
Basic Auth works in the browser against FHIR Server.
Any hint is appreciated. Thanks.
--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/8f4a4acc-8189-4c8e-a722-d0fbfefeda8fn%40googlegroups.com.