Liferay as a Headless Platform
Introducing a New Breed of Secure Hypermedia APIs
Jorge Ferrer, VP Engineering
Michael Han, VP Operations
@jorgeferrer #LSNA17
H e a d l e s s s o f t w a r e i s s o f t w a r e c a p a b l e o f
w o r k i n g w i t h o u t a   g r a p h i c a l u s e r i n t e r f a c e
W i k i p e d i a
“
@jorgeferrer #LSNA17
Why support Headless?
@jorgeferrer #LSNA17
ONE USER, MANY DEVICES AND APPLICATIONS
SPA
@jorgeferrer #LSNA17
APIs ARE ENABLERS
SPA
@jorgeferrer #LSNA17
Th e   A P I e c o n o m y   i s a n e n a b l e r f o r t u r n i n g
a b u s i n e s s o r o r g a n i z a t i o n i n t o a p l a t f o r m .
P l a t f o r m s m u l t i p l y v a l u e c r e a t i o n .
G a r t n e r
“
@jorgeferrer #LRDEVCON
Who must have
access to the API?
@jorgeferrer #LSNA17
PARTNER
PRIVATE
PLATFORM
PUBLIC
API TARGET AUDIENCE
3rd party developers
Trusted Companies
Internal Teams
Increased challenges on:
Security and usage
control
Change management
@jorgeferrer #LRDEVCON
What does Liferay
offer today?
@jorgeferrer #LSNA17
Autogenerated
Comprehensive
Featureful
Efficient
RPC
Coupled
Standard
Flexible
RESTful
@jorgeferrer #LRDEVCON
How can we
improve?
@jorgeferrer #LSNA17
Security & Control
#LRDEVCON
Authentication Authorization Service Access Quotas
21
Headless Service Security Requirements
#LRDEVCON
Authentication
SSO solutions are already supported by Portal
LDAP, SAML, CAS, NTLM, OpenID, Facebook, Google,
OpenAM/SSO, Siteminder
#LRDEVCON
Liferay to be an OAuth 2.0 provider
Giving end-users the ability to delegate permissions to
apps
• An authorization protocol for web APIs
• Protocol widely adapted on the web
• Multiple authorization granting flows available
#LRDEVCON
Authorization
Resource Owner – the User
Client – a client application (e.g. mobile application)
Authorization Server – Issues access token for clients
approved by the owner.
Resource Server – API server providing API resources
#LRDEVCON
Authorization Flows
Client Credential Grant
Resource Owner Grant
Authorization Code Grant
Implicit Grant
#LRDEVCON
For applications to authenticate on behalf of itself
Useful when getting non-user specific information from the portal
Easy migration from legacy API authentication schemes (Basic, Digest etc.)
Client Credential grant flow
1. Client ID & Client Secret
2. Access token
#LRDEVCON
2. Resource Owner Password Credentials
3. Access token
Resource Owner Credentials grant flow
1. Resource Owner Password
Credentials
Simple authentication by providing username & password
Exchanged for access token, no password storage. Suitable for trusted
first party clients.
Stian Sigvartsen | @stiansigvartsen
#LRDEVCON
User’s trust boundary
What happened to my users?
User trust issues with providing password
Only suitable for 1st party web and mobile applications
2. Resource Owner Password Credentials
3. Access token
1. Resource Owner Password
Credentials
#LRDEVCON
Authorization Code grant flow
Best option for webserver and
User agent apps
No username & password
given to app
Can be used for mobile apps,
but requires popping a web
browser
User’s trust boundary
5. Access token
2. User
authenticates &
authorizes
4. Authorization Code &
Redirect URI
1. Client ID &
Redirect URI
3. Authorization
code
#LRDEVCON
Pre-Authorized tokens for devices
Building a unified experience across multiple devices
• Maintaining a fully native experience for each
device
• Generate pre-authorized tokens via a web portal
• Mobile app receives the token via
• Onscreen QR code scanned with camera
Stian Sigvartsen | @stiansigvartsen
#LRDEVCON
One protocol to unify them all!
OAuth 2.0 provider allows API authentication
via all new and existing web SSO solutions
available to Liferay Portal
• Authorization Code grant flow
• Pre-Authorised tokens
#LRDEVCON
Your server resources are valuable, protect them
Service Access Quotas
#LRDEVCON
Service Access Quotas
• Important for building large scale systems with untrusted clients
• Protect against service abuse
• Extracts characteristics of API requests and matches against
configured quotas
• For example
• allow 100 requests
• to a service method
• within 5 minutes
• for each client IP address and User ID combination
Stian Sigvartsen | @stiansigvartsen
@jorgeferrer #LSNA17
Best of Breed APIs
@jorgeferrer #LSNA17
PARTNER API
PRIVATE API
PLATFORM
PUBLIC API
FOR ALL MODERN API NEEDS
@jorgeferrer #LSNA17
1Very easy to use
for any
developer
@jorgeferrer #LSNA17
Reduce the
need for
documentation
Embrace

REST

Best Practices
Adopt

Standards
Abstract
Liferay
Internals
HOW?
Promote

Reusability
@jorgeferrer #LSNA17
2
Designed to
evolve
@jorgeferrer #LRDEVCON
How?
REST
Hypermedia
Standard Models
Controls
Best Practices
Decoupling Consumer and
API Provider
API
@jorgeferrer #LRDEVCON
Hypermedia Controls
Single Endpoint
Consumers only know the
home URL
And are able to interpret the
listed resources
Standardized Link Types
Consumers can follow links
whose type is known
IANA standardizes many of them
We can add more on top
@jorgeferrer #LSNA17
{
"resources": {
"people": {
"href": "http://api.domain.io/o/api/p/people"
},
"organizations": {
"href": "http://api.domain.io/o/api/p/organizations"
},
[..]
"sites": {
"href": "http://api.domain.io/o/api/p/sites",
"hints": {
"media-type": "application/ld+json"
}
}
}
}
A Single Home Endpoint
http://api.domain.io/o/api
Consumers become
inmune to changes
in URLs
JSON Home Internet Draft
@jorgeferrer #LSNA17
{
"_embedded": {...},
"total": 43,
"count": 30,
"_links": {
"first": {
"href": "http://localhost:8080/o/api/p/groups?page=1&per_page=30"
},
"next": {
"href": "http://localhost:8080/o/api/p/groups?page=2&per_page=30"
},
"last": {
"href": "http://localhost:8080/o/api/p/groups?page=2&per_page=30"
}
}
}
Hypermedia pagination
Consumers become
simpler, leaving
logic to the server
IANA Link Relations Standard
@jorgeferrer #LSNA17
{
..
"actions": [
{
"name": "add-blog-posting",
"title": "Add Blog Posting",
"method": "POST",
"href": "http://localhost:8080/o/p/blogs",
"type": "application/json",
"fields": [
{ "name": "headline", "type": "text" },
{ "name": "author", "type": "Person" },
]
}
],
…
}
Forms in APIs
Consumers don’t
hardcode the fields
or types
Siren
@jorgeferrer #LRDEVCON
Standard Models (aka Shared Vocabularies)
schema.org and others
schema.org: 597 types and 867
properties
ActivityStreams, microformats,
…
Well defined custom Models
Don’t just expose your internal
models
Thinking terms through
@jorgeferrer #LSNA17
Mapping internal terms to standards
Internal schema.org
User	+	Contact Person
birthday birthDate
middleName additionalName
screenName alternateName
emailAddress email
lastName familyName
firstName givenName
fullName name
Internal schema.org
BlogsEntry BlogPosting
headline title
alternativeHeadline subtitle
description description
user creator
user author
articleBody content
aggregateRating ratings
@jorgeferrer #LSNA17
Consumer devs
don’t need to know
Liferay internals,
which are now free
to evolve
Mapping internal terms to standards
Internal schema.org	+	custom		
Group	(site=1) WebSite
name name
groupKey alternateName
user creator
Ratings	Service aggregateRatings
friendlyURL (_self)	/	(@id)
BlogsEntry	Service blogs
manualMembership (open	question)
@jorgeferrer #LSNA17
3
Ready for real
world needs
@jorgeferrer #LSNA17
Ready for real world needs
Multi-language1
2
3
Embed multiple resources to
avoid chattiness
Decide which fields to return
Very efficient
HTTP caching



Binary response formats
Consumers control
the response
Accept-Language header
@jorgeferrer #LSNA17
APIs that achieve the Glory of REST
Source: martinfowler.com/articles/richardsonMaturityModel.html
@jorgeferrer #LSNA17
Let’s see it in action
@jorgeferrer #LSNA17
@jorgeferrer #LSNA17
@jorgeferrer #LSNA17
Build your Custom APIs
@jorgeferrer #LSNA17
1Customize 

out-of-the-box
API
• Turn resources on and off as
desired
• Develop custom response
formats
@jorgeferrer #LSNA17
2Implement your
custom APIS
• Leverage JAX-RS
• Use Vulcan Architect to
simplify:
• Mapping to standard
models
• Creation of links to other
resources
@jorgeferrer #LSNA17
Build any type of consumer
@jorgeferrer #LSNA17
Bots
Mobile Apps
Microservices
Optimal for all types of consumers
Web Applications
SPA
Kiosks
Smart Watches
@jorgeferrer #LSNA17
Amazing results with our first Mobile App
80%+ of the code is
reusable
Vulcan Consumer
Thing Screenlet
Much easier to
provide offline
support
@jorgeferrer #LRDEVCON
02
03
Guidelines
Well documented guidance to build APIs
designed to evolve
01
Sharing with we have learned and built
Project codename Vulcan
Architect
Making a breeze to build modular
Hypermedia APIs
Consumer
Does all the repetitive work for
consuming a Hypermedia API
@jorgeferrer #LSNA17
PLAN FORWARD
@jorgeferrer #LRDEVCON
New API Infrastructure 01
New Breed of APIs 02
OAuth 2 03
THE PLAN
Now
7.1 (2018)
@jorgeferrer #LSNA17
Decoupled
Evolvable
Efficient
Easy
Customizable
Strong 

Security
Strong

Control
@jorgeferrer #LSNA17
You choose
Liferay with its UI Headless Liferay
Both
@jorgeferrer #LSNA17
Jorge Ferrer
@jorgeferrer
Did you like it?
Vote for it in
the Events
App!
Michael Han
@jorgeferrer #LSNA17
Image Credits
This presentation has photos from Pana
Vasquez , Oumaima Ben Chebtit, Patrick
Tomasso, jesse orrico, Toa Heftiba, Jeremy
Thomas, John Mark Arnold, Linda Xu, 35mm, Todd
Quackenbush, Sawyer Bengtson, Jorge
Gonzalez, Justin Main, Vadim Sherbakov, Kimon
Maritz and Matt Jones on Unsplash
Thanks so much, for your amazing photos.

More Related Content

PDF
Cisco ISE в управлении доступом к сети
PDF
Сети для самых маленьких. Часть восьмая. BGP и IP SLA
PDF
Federation Evolved: How Cloud, Mobile & APIs Change the Way We Broker Identity
PDF
Implementing Microservices Security Patterns & Protocols with Spring
PPTX
Developing Apps with Azure AD
PDF
Designing Usable APIs featuring Forrester Research, Inc.
PDF
Best practices and advantages of REST APIs
PDF
API, Integration, and SOA Convergence
Cisco ISE в управлении доступом к сети
Сети для самых маленьких. Часть восьмая. BGP и IP SLA
Federation Evolved: How Cloud, Mobile & APIs Change the Way We Broker Identity
Implementing Microservices Security Patterns & Protocols with Spring
Developing Apps with Azure AD
Designing Usable APIs featuring Forrester Research, Inc.
Best practices and advantages of REST APIs
API, Integration, and SOA Convergence

Similar to Liferay as a headless platform (20)

PDF
apidays LIVE Hong Kong - Orchestrating APIs at Scale by Hieu Nguyen Nhu
KEY
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
KEY
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
PDF
PPTX
Webinar: Embracing REST APIs through APPSeCONNECT
PPTX
Secure and Optimize APIs using Azure API Management
PPTX
Understanding and Executing on API Developer Experience
PDF
Building the Eventbrite API Ecosystem
PDF
FIWARE Identity Management and Access Control
PDF
Getting Started with API Management – Why It's Needed On-prem and in the Cloud
PPTX
Oscon2014 Netflix API - Top 10 Lessons Learned
PDF
João Emilio Santos Bento da Silva - Estratégia de APIs
PDF
OAuth for QuickBooks Online REST Services
PPTX
Creating Cloud-Ready Enterprise Applications with the SharePoint 2013 Add-In ...
PDF
apidays Helsinki & North 2023 - API authorization with Open Policy Agent, And...
PDF
Five Things You Gotta Know About Modern Identity
PPTX
L1 - Introduction to python Backend.pptx
PDF
Content Strategy and Developer Engagement for DevPortals
PPTX
Top 10 Lessons Learned from the Netflix API - OSCON 2014
PPTX
How APIs are Changing Software Development
apidays LIVE Hong Kong - Orchestrating APIs at Scale by Hieu Nguyen Nhu
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Webinar: Embracing REST APIs through APPSeCONNECT
Secure and Optimize APIs using Azure API Management
Understanding and Executing on API Developer Experience
Building the Eventbrite API Ecosystem
FIWARE Identity Management and Access Control
Getting Started with API Management – Why It's Needed On-prem and in the Cloud
Oscon2014 Netflix API - Top 10 Lessons Learned
João Emilio Santos Bento da Silva - Estratégia de APIs
OAuth for QuickBooks Online REST Services
Creating Cloud-Ready Enterprise Applications with the SharePoint 2013 Add-In ...
apidays Helsinki & North 2023 - API authorization with Open Policy Agent, And...
Five Things You Gotta Know About Modern Identity
L1 - Introduction to python Backend.pptx
Content Strategy and Developer Engagement for DevPortals
Top 10 Lessons Learned from the Netflix API - OSCON 2014
How APIs are Changing Software Development
Ad

Recently uploaded (20)

PPTX
using the citation of Research to create a research
PDF
Course Overview and Agenda cloud security
PPTX
最新版美国埃默里大学毕业证(Emory毕业证书)原版定制文凭学历认证
PDF
How Technology Shapes Our Information Age
PPSX
AI AppSec Threats and Defenses 20250822.ppsx
PDF
Buy Cash App Verified Accounts Instantly – Secure Crypto Deal.pdf
PPTX
WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx
PDF
healthwealthtech4all-blogspot-com-2025-08-top-5-tech-innovations-that-will-ht...
PPTX
Viva Digitally Software-Defined Wide Area Network.pptx
PPTX
Introduction to networking local area networking
PPTX
Artificial_Intelligence_Basics use in our daily life
DOCX
Powerful Ways AIRCONNECT INFOSYSTEMS Pvt Ltd Enhances IT Infrastructure in In...
PPTX
Basic understanding of cloud computing one need
PPTX
在线订购名古屋艺术大学毕业证, buy NUA diploma学历认证失败怎么办
PPTX
Concepts of Object Oriented Programming.
PDF
ilide.info-huawei-odn-solution-introduction-pdf-pr_a17152ead66ea2617ffbd01e8c...
PPTX
IT-Human Computer Interaction Report.pptx
PDF
KEY COB2 UNIT 1: The Business of businessĐH KInh tế TP.HCM
DOCX
Memecoinist Update: Best Meme Coins 2025, Trump Meme Coin Predictions, and th...
PPTX
KSS ON CYBERSECURITY INCIDENT RESPONSE AND PLANNING MANAGEMENT.pptx
using the citation of Research to create a research
Course Overview and Agenda cloud security
最新版美国埃默里大学毕业证(Emory毕业证书)原版定制文凭学历认证
How Technology Shapes Our Information Age
AI AppSec Threats and Defenses 20250822.ppsx
Buy Cash App Verified Accounts Instantly – Secure Crypto Deal.pdf
WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx
healthwealthtech4all-blogspot-com-2025-08-top-5-tech-innovations-that-will-ht...
Viva Digitally Software-Defined Wide Area Network.pptx
Introduction to networking local area networking
Artificial_Intelligence_Basics use in our daily life
Powerful Ways AIRCONNECT INFOSYSTEMS Pvt Ltd Enhances IT Infrastructure in In...
Basic understanding of cloud computing one need
在线订购名古屋艺术大学毕业证, buy NUA diploma学历认证失败怎么办
Concepts of Object Oriented Programming.
ilide.info-huawei-odn-solution-introduction-pdf-pr_a17152ead66ea2617ffbd01e8c...
IT-Human Computer Interaction Report.pptx
KEY COB2 UNIT 1: The Business of businessĐH KInh tế TP.HCM
Memecoinist Update: Best Meme Coins 2025, Trump Meme Coin Predictions, and th...
KSS ON CYBERSECURITY INCIDENT RESPONSE AND PLANNING MANAGEMENT.pptx
Ad

Liferay as a headless platform