How to get a FeatureManager in our SSO plugin ?

Anonymouslemming June 8, 2015

We have a locally maintained SSO library. As part of our upgrade to JIRA 6, we want to disable the new project view for newly created users.

I've got this working in a REST plugin to disable the feature for existing users, and I'm trying to add this to my SSO plugin.

In my REST plugin module, I do the following

public class MyRestPlugin {
	private final FeatureManager featureManager;
	public MyRestPlugin(final FEatureManager featureManager) {
		this.featureManager = featureManager;
	}
}

 

This same approach doesn't work in my SSO library. I get errors at startup stating:

"Unable to instantiate class 'org.us.jira.plugin.sso.SSOAuthenticator' : java.lang.InstantiationException: org.us.jira.plugin.sso.SSOAuthenticator"

 

My SSO library extends DefaultAuthenticator and is called very early in the startup process.

Can anyone advise how I get a FeatureManager in an SSO library please ?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 8, 2015

See this page:

https://confluence.atlassian.com/display/DEV/Single+Sign-on+Integration+with+JIRA+and+Confluence

The tips included for Confluence apply to JIRA as well, with a few tweaks.  Specifically:

  • Use "JiraSeraphAuthenticator" as the base class.
  • Use "ComponentAccessor.getComponent" in place of "ContainerManager.getInstance".

crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 8, 2015

I have added that information to the page, as well.

Anonymouslemming June 8, 2015

Thanks loads - that's worked perfectly!

TAGS
AUG Leaders

Atlassian Community Events