Custom OAuth2 plugin

I'm developing a custom plugin to integrate Jira 6.3.14 with an OAuth2 server.

First of all, as described here I changed seraph-confix.xml and extended JiraSeraphAuthenticator.

I overrode the method Principal getUser(HttpServletRequest request,
HttpServletResponse response). The first thing the method has to do is redirecting the user to the server to allow the user insert their credentials in a form via "response.sendRedirect(url);". The method getUser however gets called more than once. The first time, response is not null but the following times it becomes null and when finally response.sendRedirect(url) gets called I have a NullpointerException. Whys isn't this working? Do I have to change my web.xml in some way as well other than editing seraph-config.xml? can I perform a redirection inside the getUser method?

1 comment

Sam Hall Community Champion May 08, 2017

Probably worth posting this on the dev community if you haven't already: https://community.developer.atlassian.com

Thanks. It's my first post I didn't know about the existance of the developers forum. Thank you!

No problem. It's not obvious unless you know! Hoping Atlassian will sign-post it a bit more clearly.

Anyway, here's a link to the thread you opened there in case anyone seeing this wants to answer or read: https://community.developer.atlassian.com/t/custom-oauth-2-0-plugin-development/3528

Comment

Log in or Sign up to comment
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jun 14, 2018 in Jira Service Desk

How the Telegram Integration for Jira helps Sergey's team take their support efficiency to the bank

...+ reading Fantasy). The same is true for him at the bank he works for: Efficiency is key when time literally equals money. Read on to learn how Sergey makes most of the time he has by...

508 views 3 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you