R4 Secure Sandbox Token invalid authorization header

148 views
Skip to first unread message

Alex Creech

unread,
Feb 22, 2023, 6:57:34 PM2/22/23
to Oracle Cerner FHIR Developers
I have a Provider based confidential app using the Smart workflow. I have a system account setup with a secret and a jwks url.

When i get to the point where I call the token endpoint, I've got it work using the secret by creating a Basic authorization header (client_id:client_secret base64 encoded) with the following parameters:

grant_type : authorization_code
redirect_url : [my url]
code : [code from auth call]
state : [my state]

Now, when I try to use the jwks url instead of the secret, i can't get it to work. From what I can tell from the documentation I do the exact same as above but set the authorization header to Bearer and create a jwt token based on a key in the jwks url and some other information for sub, issuer, aud, etc...

When I try it I get an error saying the authorization header is invalid.


correlation id: f7007d3d-8049-4264-b5a6-0e591e8c554c

Aaron McGinn (Oracle Cerner)

unread,
Feb 23, 2023, 8:28:46 PM2/23/23
to Oracle Cerner FHIR Developers
Does your header value include "Basic " before the base64 encoded client ID/secret?

-Aaron (Oracle Cerner)

Alex Creech

unread,
Feb 24, 2023, 8:04:03 AM2/24/23
to Oracle Cerner FHIR Developers
When I do auth using clientid\secret, yes. And that works fine. What doesn't work is when trying to use the jwks url. I've tried "Bearer [jwttoken]" and also adding client_assertion_type and client_assertion as parameters to the post call.
Reply all
Reply to author
Forward
0 new messages