Add Token Passthrough to RestBinding
Closed this issue · 3 comments
Is your feature request related to a problem? Please describe.
Currently working on a SMART on FHIR implementation using the toolkit. For simplicity of use, it would be best for us to pass through the access token from the client to the FHIR Service instead of additional AAD setup for the on-behalf-of flow (which gives us nothing here).
Describe the solution you'd like
I would like the ability to pass through the access token from the request to the REST Binding.
Additional context
Authenticator, rest request builder, and rest binding will all need to be updated.
In the OpeationContext properties dictionary add a key for "BootstrapToken" and make the value the access token from the request. In the RestBinding check for the presence of the "BootstrapToken" key and default to that for the security token; otherwise get the token from the IAuthenticator (if not null). This way you can still use the IAuthenticator if needed, but leverage the BootStrapToken if you set it in an IFilter.
Thanks @w-matt-long!!! Will test and document 👍🏽
Working on this as part of another PR