Redirect is not working in custom plugin

Hi Community Team,

I have developed custom sso plugin
Developed using OAuth2IdentityProvider
nginx config for reverse proxy and integrated with LDAP details

Its working fine with SQ 9.x community build.

I tried to deploy in latest SQ 25.x community build, sso is not working. When i am clicking the button, it is redirecting to same page.
Am i missing anything ?

I have already updated sonarqube api in custom plugin.

I checked, its calling redirect method but after that its not calling back.

Code snippet:
public void init(InitContext context) {
String validateUrl = webContext + “/pluginKey/validate”;
context.redirectTo(validateUrl);
}

Error log:
DEBUG web[76tggt-1a7b-41d3-876c-65273fe][auth.event] login failure [cause|User must be authenticated][method|BASIC][provider|LOCAL|local][IP|IP_ADDRESS,true][login|]

Could you help on this?

Hi,

Sorry, this is not something we’re going to be much help with.

That said, I notice in your code snippet:

That you include the webContext, but not the server base URL. Without a more fulsome error message, it’s difficult to know if that’s the problem here, but it’s certainly where I would start.

 
HTH,
Ann

Hi Ann,

Thanks for the help !
I am able to solve the issue.

1 Like