Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA custom plugin authentication

Subhajit Bhuiya June 5, 2018

I have written custom servlet and REST module for JIRA. I want user to authenticate before using those servlet or REST API if user has not done authentication yet. Do I need to written servlet filter for authentication or JIRA provides something out of the box for custom REST plugin or Servelt plugin.

If I have to write my own authentication servlet filter, is there any example available for it

1 answer

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2018

Hello,

For a servlet you can check if a user is logged in and if not, then redirect to the login page. You can find an example here:

https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-make-a-Servlet-plugin-module-accessible-only-after-login/qaq-p/548510

Your REST endpoint must require login. The @AnonymousAllowed annotation does the opposite.

You can also create a servlet-filter, which would redirect to the login page as it is in the servlet example.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events