Camel-FHIR Authorization

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Camel-FHIR Authorization

Kevin Mayfield
Hi,

I have a HAPI FHIR/HL7v2 Message Server which is working with a FHIR CDR Server. I'm after both servers running off the same OAuth2 server.

So if I send a HL7 FHIR/v2 Message to the first server and after this has been converted to a FHIR Transaction this is sent to the CDR server.
I want to pass through the token used at the Message server to the EPR server.

Is this possible?
I've looked at using accessToken but my token is going to be dynamic.

I think I may need to use my own IGenericClient with an auth interceptor

Many thanks

Reply | Threaded
Open this post in threaded view
|

RE: Camel-FHIR Authorization

Lars Haugaard Kristensen
Hi Kevin,

I've had success using the accessToken parameter in combination with .toD().

https://camel.apache.org/manual/latest/faq/how-to-use-a-dynamic-uri-in-to.html

Regards
Lars

-----Original Message-----
From: Kevin Mayfield <[hidden email]>
Sent: 17. april 2020 15:07
To: [hidden email]
Subject: Camel-FHIR Authorization

Hi,

I have a HAPI FHIR/HL7v2 Message Server which is working with a FHIR CDR Server. I'm after both servers running off the same OAuth2 server.

So if I send a HL7 FHIR/v2 Message to the first server and after this has been converted to a FHIR Transaction this is sent to the CDR server.
I want to pass through the token used at the Message server to the EPR server.

Is this possible?
I've looked at using accessToken but my token is going to be dynamic.

I think I may need to use my own IGenericClient with an auth interceptor

Many thanks

Reply | Threaded
Open this post in threaded view
|

RE: Camel-FHIR Authorization

Kevin Mayfield
Thanks. I'd forgotten about dynamic endpoints.

Never been more pleased to see 401 from an expired token.
Does that recreate the client every time?

-----Original Message-----
From: Lars Haugaard Kristensen <[hidden email]>
Sent: 17 April 2020 14:26
To: [hidden email]
Subject: RE: Camel-FHIR Authorization

Hi Kevin,

I've had success using the accessToken parameter in combination with .toD().

https://camel.apache.org/manual/latest/faq/how-to-use-a-dynamic-uri-in-to.html

Regards
Lars

-----Original Message-----
From: Kevin Mayfield <[hidden email]>
Sent: 17. april 2020 15:07
To: [hidden email]
Subject: Camel-FHIR Authorization

Hi,

I have a HAPI FHIR/HL7v2 Message Server which is working with a FHIR CDR Server. I'm after both servers running off the same OAuth2 server.

So if I send a HL7 FHIR/v2 Message to the first server and after this has been converted to a FHIR Transaction this is sent to the CDR server.
I want to pass through the token used at the Message server to the EPR server.

Is this possible?
I've looked at using accessToken but my token is going to be dynamic.

I think I may need to use my own IGenericClient with an auth interceptor

Many thanks