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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.