[IDEA] Add ability to set response code in Custom Authenticator scenario #4776
Labels
enhancement
New feature or request
Internal-Issue-Created
An issue has been created in NextGen's internal issue tracker
RS-6999
triaged
Is your feature request related to a problem? Please describe.
At this time Mirth Connect in Http Listener/Custom Authentication class (
com.mirth.connect.plugins.httpauth.Authenticator
) does not allow me to set any other response code other than401
. After pulling the code, I saw that401
is hard coded forFAIL
andCHALLENGE
cases. There's no variable to use to set it to a different value.Describe your use case
We are developing custom authentication class that will verify jwt token using
issuer
andaudience
. This part works well I am able to do that. But we have a requirement that when token is expired mirth should respond with403
in this specific case. The401
case will be valid in other scenarios. For that reason I am asking for that value to be settable in code in my extending class.Describe the solution you'd like
When creating an instance of
com.mirth.connect.plugins.httpauth.AuthenticationResult
I would like to be able to set response code that I want to use.Describe alternatives you've considered
It is not ideal because we really like the idea of custom interceptor class, the other solution is to use a filter inside a channel. This will let me set custom response code but it is not ideal.
Additional context
Related: #4159 #4725
The text was updated successfully, but these errors were encountered: