I have a REST API inside my jira plugin, without @AnonymousAllowed annotation:
My question is: How can I custom 401 response when an unauthorized user try to access my resources, such as redirect them to another page, or send them a HTML page,... instead of just send a xml error. Thanks a lot for your help.
Hello,
You should add the serlvet-filter module:
https://developer.atlassian.com/server/jira/platform/servlet-filter/
You should catch all request to the 401 error page and redirect your user to the page you want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are most welcome!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.