Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IDEA] Add ability to set response code in Custom Authenticator scenario #4776

Open
psapozh opened this issue Oct 7, 2021 · 1 comment
Open
Labels
enhancement New feature or request Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-6999 triaged

Comments

@psapozh
Copy link

psapozh commented Oct 7, 2021

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 than 401. After pulling the code, I saw that 401 is hard coded for FAIL and CHALLENGE 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 and audience. This part works well I am able to do that. But we have a requirement that when token is expired mirth should respond with 403 in this specific case. The 401 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

@psapozh
Copy link
Author

psapozh commented Oct 12, 2021

Hello tagging here @twest-mirthconnect and @cturczynskyj as requested.

@cturczynskyj cturczynskyj added Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-6999 triaged labels Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-6999 triaged
Projects
None yet
Development

No branches or pull requests

2 participants