Legacy Knowledge Base
Published Jul. 2, 2025

Using Liferay Connector to OAuth EE

Written By

Justin Choi

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

What is OAuth? It is a utility that authorizes third party applications to interact with the Liferay platform. The example from our official documentation is worth repeating here; users can make Twitter or Facebook available on Liferay Portal or DXP. To gain access to Facebook or Twitter, instead of users entering their credentials again in Liferay, OAuth creates a handshake and Liferay will redirect users to the service provider. The service provider will grant limited access to the Liferay platform.

Liferay is integrated with the OAuth 1.0 Protocol. Developers wishing to deploy OAuth on their environments can download the Liferay Connector to OAuth EE Plugin from Liferay Marketplace. 

Resolution

Useful Terminology

(Section 1.1 Terminology)

Resource Owner

  • An entity capable of accessing and controlling protected resources by using credentials to authenticate with the server. For example: Jane has uploaded her vacation photos on a web-based site like Flickr; she is the "resource owner." 

Credentials

  • Credentials are two things: (1) a unique identifier and (2) a matching shared secret.
  • OAuth defines three classes of credentials: client, temporary and token. These are used to identify and authenticate the following:
    • The client making the request 
    • The authorization request
    • The access grant 

Token

  • A unique identifier issued by the server and used by the client to associate authenticated requests with the Resource Owner, whose authorization is requested or has been obtained by the client. Tokens have a matching shared-secret that is used by the client to establish its ownership of the token and its authority to represent the Resource Owner. 

 

Frequently Asked Questions 

How can I implement OAuth in my Liferay platform?

  1. For more information on how to develop a custom interface to manage communications between the different web services, refer to the two OAuth articles below. The following is a quick start.
  2. After the OAuth app has been registered, click Actions > View.
  3. Notice that the Liferay platform generated two Application Credentials: the Consumer Key and Consumer Secret.
  4. The consumer key is a value used by the application to identify itself to the service provider. Likewise, the consumer secret is a value the application uses to establish ownership of the consumer key.  

    01.png

  5. In the case of plugins, Liferay platform plugins using OAuth must refer to the OAuth standards found in a client library. The client library is found in a specific jar called Scribe which is located inside the portal .war WEB-INF\lib folder directory. If there is a specific plugin which needs to authenticate using OAuth, open the plugin's liferay-plugin-package.properties file and add scribe.jar as a portal dependency.
    	portal-dependency-jars=\
    	scribe.jar
        
  6. Deploy the OAuth app from Liferay Marketplace onto the portal.
  7. Navigate to OAuth Admin tab now available after the app has been installed.
  8. Click Add. The Add view looks like this:

    02.png

 

What information can I use as grant types? 

Under the Liferay Connector to OAuth 1.0 Protocol, only the client credentials (or temporary credentials as tokens) are used. See Section 2.2 Resource Owner Authorization and Section 2.3 Token Credentials.

At this point, there are no plans to implement Liferay Connector to OAuth 2.0 Protocols on the Liferay road map. Different types of authorization grants under the Liferay Connector to OAuth 2.0 Protocols are not available in legacy Liferay Portal versions or in DXP. 

Additional Information

Please reference the following articles:

See the following feature request tickets on implementing OAuth 2.0 in the future:
Did this article resolve your issue ?

Legacy Knowledge Base