Message Boards

Remove redirection while using OpenID Connect

Upender Kashyap, modified 3 Years ago.

Remove redirection while using OpenID Connect

Junior Member Posts: 30 Join Date: 8/12/20 Recent Posts
Hello, I am completely new to Liferay. I am doing login in Liferay DXP 7.2 Portal through OpenID Connect with Azure AD as IdP. When I click Sign In on portal it navigates to Sign In popup where I select OpendID Connect (attached popup 1)and then I am redirected to popup having OpenID providers list (attached popup 2)which contains only one value in drop down as our requirement is to provide access through Microsoft only. Then I am redirected to actual login window where I need to enter email (attached popup 3).
I want to skip these two intermediate popup as they are unnecessary and directly would like two enter email. Can anybody help on this? Thanks in advance.
thumbnail
Jack Bakker, modified 3 Years ago.

RE: Remove redirection while using OpenID Connect

Liferay Master Posts: 978 Join Date: 1/3/10 Recent Posts
Hi Upender, You might look at this https://lifedev-solutions.blogspot.com/2020/03/liferay-keycloak-integration-sso-and.html   
The approach works for me in Liferay against Keycloak and I don't see why it wouldn't against Azure AD. For Liferay v7.3.3 CE I had to modify it slightly as there were small changes in dependent code in Liferay v7.3.3 compared to v7.3.2 
Upender Kashyap, modified 3 Years ago.

RE: Remove redirection while using OpenID Connect

Junior Member Posts: 30 Join Date: 8/12/20 Recent Posts
Hi There,OpenIdConnectProviderRegistry and OpenIdConnectServiceHandler References given in above blog are throwing nullpointer.
@Reference    
    private OpenIdConnectProviderRegistry _openIdConnectProviderRegistry;
    @Reference   
    private OpenIdConnectServiceHandler _openIdConnectServiceHandler;
Not able to resolve these dependencies. Can I get some pointers on this issue?
Thanks in Advance
thumbnail
Olaf Kock, modified 3 Years ago.

RE: Remove redirection while using OpenID Connect

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts
Upender Kashyap:

Hi There,OpenIdConnectProviderRegistry and OpenIdConnectServiceHandler References given in above blog are throwing nullpointer.
@Reference    
    private OpenIdConnectProviderRegistry _openIdConnectProviderRegistry;
    @Reference   
    private OpenIdConnectServiceHandler _openIdConnectServiceHandler;
Not able to resolve these dependencies. Can I get some pointers on this issue?
@Reference only gets resolved within a @Component. If you're not using them in such a class, they won't be resolved/autowired, thus generating NPE. If they were properly initialized, they'd never be null, as you didn't declare them as optional.
thumbnail
Jack Bakker, modified 3 Years ago.

RE: Remove redirection while using OpenID Connect

Liferay Master Posts: 978 Join Date: 1/3/10 Recent Posts
The blog shows snippets of useful code and provides guidance yet you'll still need to create a suitable module in a Liferay workspace. I can't tell from what you write how far along you are in setting up your dev environment. You might reach out also to the blog author.