Message Boards
OAuth 2 authentication / Authorization between two Liferay DXP servers
sree p, modified 4 Years ago.
OAuth 2 authentication / Authorization between two Liferay DXP servers
Junior Member Posts: 91 Join Date: 10/3/19 Recent Posts
Hello, I am using Liferay DXP servers want to do OAuth 2 Authentication/Authorization between two Liferay DXP servers, One as Server and other as Client, can you please let me know what steps I can perform ?
Mohammed Yasin, modified 4 Years ago.
RE: OAuth 2 authentication / Authorization between two Liferay DXP servers
Liferay Master Posts: 591 Join Date: 8/8/14 Recent Posts
Hi ,You can create an OAuth Application for Liferay DXP(client) in Liferay DXP(Server) and use the client id and client secret for access authorization from Liferay DXP(Server).
You can refer below link
https://help.liferay.com/hc/en-us/articles/360018176491-OAuth-2-0#creating-an-application
You can refer below link
https://help.liferay.com/hc/en-us/articles/360018176491-OAuth-2-0#creating-an-application
sree p, modified 3 Years ago.
RE: OAuth 2 authentication / Authorization between two Liferay DXP servers
Junior Member Posts: 91 Join Date: 10/3/19 Recent Posts
Hello, I already did that by following LIferay document, I created oauth application in liferay DXP (Server) , not sure how i can test from Liferay DXP ( Client) using client id and client secrete for authentiation/authorization
Mohammed Yasin, modified 3 Years ago.
RE: OAuth 2 authentication / Authorization between two Liferay DXP servers
Liferay Master Posts: 591 Join Date: 8/8/14 Recent Posts
Hi,
You can refer below for url,which u can call from Liferay DXP (Client ) and get the authorization code using which you can get access token https://help.liferay.com/hc/en-us/articles/360018176511-Authorizing-Account-Access-with-OAuth2#authorization-code-flow
You can refer below for url,which u can call from Liferay DXP (Client ) and get the authorization code using which you can get access token https://help.liferay.com/hc/en-us/articles/360018176511-Authorizing-Account-Access-with-OAuth2#authorization-code-flow
sree p, modified 3 Years ago.
RE: OAuth 2 authentication / Authorization between two Liferay DXP servers
Junior Member Posts: 91 Join Date: 10/3/19 Recent Posts
Hi Mohammed Yasin, I want to do an authentication against Liferay DXP (Client) using oAUTH , but what that document says, first I need to login to Liferay DXP (Client) with userid&pwd and then get token, this is not what I am looking.
Mohammed Yasin, modified 3 Years ago.
RE: OAuth 2 authentication / Authorization between two Liferay DXP servers
Liferay Master Posts: 591 Join Date: 8/8/14 Recent Posts
You can try Client Credential flow instead of Authorization Code flow where you don't need to login , you can directly get access token with client id and client secret and use the service
https://help.liferay.com/hc/en-us/articles/360018176511-Authorizing-Account-Access-with-OAuth2#client-credentials-and-resource-owner-flows
https://help.liferay.com/hc/en-us/articles/360018176511-Authorizing-Account-Access-with-OAuth2#client-credentials-and-resource-owner-flows
sree p, modified 3 Years ago.
RE: OAuth 2 authentication / Authorization between two Liferay DXP servers
Junior Member Posts: 91 Join Date: 10/3/19 Recent Posts
Thanks Mohammed Yasin for your quick response, may be I am not presenting my question properly, let me try to clear here, I configured one liferay dxp as server and another DXP instance as Client, so using oauth I want to authenticate to Client instance . ex: I have Liferay dxp (Server) url is https://abcliferayserver.com in this server I created oauth application for Liferay dxp(Client) url is https://xyzliferayclient.com. If I hit the client url from browser then how can a user authenticate ? can authenticate as user using oAuth?