SlideShare a Scribd company logo
Deep Dive into OAuth for
Connected Apps
​ Hargobind Singh
​ Senior Manager
​ hargobind.singh@capgemini.com
​ @hargobindsingh
​ 
Hargobind Singh
Senior Manager, Capgemini
•  About oAuth
•  Implementation Scenarios
•  Demo
•  Wrap Up
Overview
About oAuth
​ The OAuth specification defines a delegation
protocol that is useful for conveying
authorization decisions across a network of
web-enabled applications and APIs
​ Benefits :
​ - Security
​ - Maintenance
​ - Ease of Use
Why OAuth ?
App
Access App
Authenticate
Authorize
​ OAuth allows a client application restricted
access to your data at a resource server via tokens
issued by an authorization server in response to
your authorization.
​ Token Types:
Authorization Code
short-lived token created by the authorization server and
passed to the client application via the browser.
Access Token
The access token is used by the client to make
authenticated requests on behalf of the end user.
Refresh Token
The refresh token may have an indefinite lifetime
oAuth
Implementation Scenarios
Web Server Flow
​ Most web apps would use a web-server
flow to obtain a token on behalf of the
end-user
Authenticate, Authorize Client
Parameter Description
response_type Must be set to code to
request an authorization
code.
client_id Your application's client
identifier (consumer key in
Connected App Detail).
redirect_uri The end user's browser will
be redirected to this URI with
the authorization code. This
must match your application's
configured callback URL.
Token Response
Parameter Description
code The value returned by the
authorization server in the
previous step.
grant_type Set this to authorization_code.
client_id Your application's client identifier.
client_secret Your application's client secret
(consumer secret in the
connected app detail page).
redirect_uri Again, this must match your
application's configuration.
Web Server Flow: Response
Parameter Description
id A URL, representing the
authenticated user, which can
be used to access the Identity
Service.
instance_url Identifies the Salesforce
instance
refresh_token A long-lived token that may be
used to obtain a fresh access
token
access_token The short-lived access token.
Web Server Flow - Response
​ Sample Response
User Agent Flow
​ The user agent flow allows client
applications running on user’s browser
to obtain an access token
Request Token
Parameter Description
response_type Value can be token, or token
id_token with the scope
parameter openid and a nonce
parameter
client_id Your application's client identifier
(consumer key in Connected
App Detail).
redirect_uri The end user's browser will be
redirected to this URI with the
authorization code. This must
match your application's
configured callback URL.
User Agent Flow: Response
Parameter Description
id A URL, representing the
authenticated user, which can
be used to access the Identity
Service.
instance_url Identifies the Salesforce
instance
refresh_token A long-lived token that may be
used to obtain a fresh access
token
access_token The short-lived access token.
Token Refresh
​ Once the lifetime of a token expires, the
client application can use the refresh
token to obtain a new access token
Request Token
Parameter Description
grant_type Set this to refresh_token.
client_id Your application's client
identifier.
client_secret Your application's client
secret (optional).
refresh_token The refresh token provided
in the previous
authorization.
Token Refresh: Response
Parameter Description
id A URL, representing the
authenticated user, which can
be used to access the Identity
Service.
instance_url Identifies the Salesforce
instance
refresh_token A long-lived token that may be
used to obtain a fresh access
token
access_token The short-lived access token.
Demo
Demo
​ Connected App
​ Web Server Flow:
•  Send request to get token
•  Send token to get Access Token
•  Use Access Token to query data
Wrap Up
Wrap Up
​ What we covered:
•  oAuth Basics
•  oAuth Implementation Flows
•  Demo
​ More Info:
•  Salesforce oAuth Documentation
Questions
​ Hargobind Singh
​ @hargobindsingh
Thank you

More Related Content

What's hot (20)

PDF
Api Testing.pdf
JitendraYadav351971
 
PPTX
An Introduction to OAuth 2
Aaron Parecki
 
PPTX
Rest API Security - A quick understanding of Rest API Security
Mohammed Fazuluddin
 
PDF
Introduction to OpenID Connect
Nat Sakimura
 
PPTX
OAuth2 + API Security
Amila Paranawithana
 
PDF
OAuth 2.0
Uwe Friedrichsen
 
PPTX
Api Testing
Vishwanath KC
 
PDF
API Security Best Practices & Guidelines
Prabath Siriwardena
 
PDF
REST API and CRUD
Prem Sanil
 
PPTX
An Introduction to OAuth2
Aaron Parecki
 
PPTX
Burp suite
SOURABH DESHMUKH
 
PPTX
OpenID Connect: An Overview
Pat Patterson
 
PPTX
OAuth with Salesforce - Demystified
Calvin Noronha
 
PPT
Postman.ppt
ParrotBAD
 
PDF
Api security-testing
n|u - The Open Security Community
 
PDF
Keycloak Single Sign-On
Ravi Yasas
 
PDF
OAuth 2.0 with IBM WebSphere DataPower
Shiu-Fun Poon
 
PPTX
Api types
Sarah Maddox
 
PDF
Spring security oauth2
axykim00
 
PDF
OAuth 2.0 and OpenID Connect
Jacob Combs
 
Api Testing.pdf
JitendraYadav351971
 
An Introduction to OAuth 2
Aaron Parecki
 
Rest API Security - A quick understanding of Rest API Security
Mohammed Fazuluddin
 
Introduction to OpenID Connect
Nat Sakimura
 
OAuth2 + API Security
Amila Paranawithana
 
OAuth 2.0
Uwe Friedrichsen
 
Api Testing
Vishwanath KC
 
API Security Best Practices & Guidelines
Prabath Siriwardena
 
REST API and CRUD
Prem Sanil
 
An Introduction to OAuth2
Aaron Parecki
 
Burp suite
SOURABH DESHMUKH
 
OpenID Connect: An Overview
Pat Patterson
 
OAuth with Salesforce - Demystified
Calvin Noronha
 
Postman.ppt
ParrotBAD
 
Api security-testing
n|u - The Open Security Community
 
Keycloak Single Sign-On
Ravi Yasas
 
OAuth 2.0 with IBM WebSphere DataPower
Shiu-Fun Poon
 
Api types
Sarah Maddox
 
Spring security oauth2
axykim00
 
OAuth 2.0 and OpenID Connect
Jacob Combs
 

Similar to Deep Dive into OAuth for Connected Apps (20)

PDF
Authentication with OAuth and Connected Apps
Salesforce Developers
 
PDF
04 june meetup - An overview of OAuth2 on Force.com projects
Aldo Fernandez
 
PPTX
Deep dive into Salesforce Connected App
Dhanik Sahni
 
PDF
Digging Deeper into Desktop and Mobile App Security
Salesforce Developers
 
PPTX
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)
gemziebeth
 
PPTX
Hands-on with OAuth, Facebook and the Force.com Platform
Pat Patterson
 
PDF
CIS14: OAuth and OpenID Connect in Action
CloudIDSummit
 
PDF
CIS14: OAuth and OpenID Connect in Action
CloudIDSummit
 
PPTX
OAuth Authorization flows in salesforce
Kishore B T
 
PPTX
Y U No OAuth?!?
Jason Robert
 
PPTX
O auth with facebook and google using .net
Sathyaish Chakravarthy
 
PPTX
OAuth2 Authorization Server Under the Hood
Lohika_Odessa_TechTalks
 
PPT
O auth 2
Nisha Baswal
 
PPTX
Mulesoft Salesforce Connector - OAuth 2.0 JWT Bearer
Vince Soliza
 
PPTX
Y U No OAuth, Using Common Patterns to Secure Your Web Applications
Jason Robert
 
PPTX
Devteach 2017 OAuth and Open id connect demystified
Taswar Bhatti
 
PDF
Iam f42 a
SelectedPresentations
 
PPTX
Wso2 is integration with .net core
Ismaeel Enjreny
 
PDF
OAuth In The Real World : 10 actual implementations you can't guess
Mehdi Medjaoui
 
PDF
Demystifying OAuth 2.0
Karl McGuinness
 
Authentication with OAuth and Connected Apps
Salesforce Developers
 
04 june meetup - An overview of OAuth2 on Force.com projects
Aldo Fernandez
 
Deep dive into Salesforce Connected App
Dhanik Sahni
 
Digging Deeper into Desktop and Mobile App Security
Salesforce Developers
 
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)
gemziebeth
 
Hands-on with OAuth, Facebook and the Force.com Platform
Pat Patterson
 
CIS14: OAuth and OpenID Connect in Action
CloudIDSummit
 
CIS14: OAuth and OpenID Connect in Action
CloudIDSummit
 
OAuth Authorization flows in salesforce
Kishore B T
 
Y U No OAuth?!?
Jason Robert
 
O auth with facebook and google using .net
Sathyaish Chakravarthy
 
OAuth2 Authorization Server Under the Hood
Lohika_Odessa_TechTalks
 
O auth 2
Nisha Baswal
 
Mulesoft Salesforce Connector - OAuth 2.0 JWT Bearer
Vince Soliza
 
Y U No OAuth, Using Common Patterns to Secure Your Web Applications
Jason Robert
 
Devteach 2017 OAuth and Open id connect demystified
Taswar Bhatti
 
Wso2 is integration with .net core
Ismaeel Enjreny
 
OAuth In The Real World : 10 actual implementations you can't guess
Mehdi Medjaoui
 
Demystifying OAuth 2.0
Karl McGuinness
 
Ad

More from Salesforce Developers (20)

PDF
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Salesforce Developers
 
PDF
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Salesforce Developers
 
PDF
Local development with Open Source Base Components
Salesforce Developers
 
PPTX
TrailheaDX India : Developer Highlights
Salesforce Developers
 
PDF
Why developers shouldn’t miss TrailheaDX India
Salesforce Developers
 
PPTX
CodeLive: Build Lightning Web Components faster with Local Development
Salesforce Developers
 
PPTX
CodeLive: Converting Aura Components to Lightning Web Components
Salesforce Developers
 
PPTX
Enterprise-grade UI with open source Lightning Web Components
Salesforce Developers
 
PPTX
TrailheaDX and Summer '19: Developer Highlights
Salesforce Developers
 
PDF
Live coding with LWC
Salesforce Developers
 
PDF
Lightning web components - Episode 4 : Security and Testing
Salesforce Developers
 
PDF
LWC Episode 3- Component Communication and Aura Interoperability
Salesforce Developers
 
PDF
Lightning web components episode 2- work with salesforce data
Salesforce Developers
 
PDF
Lightning web components - Episode 1 - An Introduction
Salesforce Developers
 
PDF
Migrating CPQ to Advanced Calculator and JSQCP
Salesforce Developers
 
PDF
Scale with Large Data Volumes and Big Objects in Salesforce
Salesforce Developers
 
PDF
Replicate Salesforce Data in Real Time with Change Data Capture
Salesforce Developers
 
PDF
Modern Development with Salesforce DX
Salesforce Developers
 
PDF
Get Into Lightning Flow Development
Salesforce Developers
 
PDF
Integrate CMS Content Into Lightning Communities with CMS Connect
Salesforce Developers
 
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Salesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Salesforce Developers
 
Local development with Open Source Base Components
Salesforce Developers
 
TrailheaDX India : Developer Highlights
Salesforce Developers
 
Why developers shouldn’t miss TrailheaDX India
Salesforce Developers
 
CodeLive: Build Lightning Web Components faster with Local Development
Salesforce Developers
 
CodeLive: Converting Aura Components to Lightning Web Components
Salesforce Developers
 
Enterprise-grade UI with open source Lightning Web Components
Salesforce Developers
 
TrailheaDX and Summer '19: Developer Highlights
Salesforce Developers
 
Live coding with LWC
Salesforce Developers
 
Lightning web components - Episode 4 : Security and Testing
Salesforce Developers
 
LWC Episode 3- Component Communication and Aura Interoperability
Salesforce Developers
 
Lightning web components episode 2- work with salesforce data
Salesforce Developers
 
Lightning web components - Episode 1 - An Introduction
Salesforce Developers
 
Migrating CPQ to Advanced Calculator and JSQCP
Salesforce Developers
 
Scale with Large Data Volumes and Big Objects in Salesforce
Salesforce Developers
 
Replicate Salesforce Data in Real Time with Change Data Capture
Salesforce Developers
 
Modern Development with Salesforce DX
Salesforce Developers
 
Get Into Lightning Flow Development
Salesforce Developers
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Salesforce Developers
 
Ad

Recently uploaded (20)

PDF
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
PDF
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
PDF
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
PPTX
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
PPTX
Mastering Authorization: Integrating Authentication and Authorization Data in...
Hitachi, Ltd. OSS Solution Center.
 
PDF
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
PDF
Kubernetes - Architecture & Components.pdf
geethak285
 
PPTX
Wondershare Filmora Crack Free Download 2025
josanj305
 
PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
PDF
Understanding AI Optimization AIO, LLMO, and GEO
CoDigital
 
PPTX
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
PDF
Proactive Server and System Monitoring with FME: Using HTTP and System Caller...
Safe Software
 
PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
PDF
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
PDF
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
PDF
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
PDF
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
WSO2
 
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
Mastering Authorization: Integrating Authentication and Authorization Data in...
Hitachi, Ltd. OSS Solution Center.
 
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
Kubernetes - Architecture & Components.pdf
geethak285
 
Wondershare Filmora Crack Free Download 2025
josanj305
 
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
Understanding AI Optimization AIO, LLMO, and GEO
CoDigital
 
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
Proactive Server and System Monitoring with FME: Using HTTP and System Caller...
Safe Software
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
WSO2
 

Deep Dive into OAuth for Connected Apps

  • 1. Deep Dive into OAuth for Connected Apps ​ Hargobind Singh ​ Senior Manager ​ [email protected] ​ @hargobindsingh ​ 
  • 3. •  About oAuth •  Implementation Scenarios •  Demo •  Wrap Up Overview
  • 5. ​ The OAuth specification defines a delegation protocol that is useful for conveying authorization decisions across a network of web-enabled applications and APIs ​ Benefits : ​ - Security ​ - Maintenance ​ - Ease of Use Why OAuth ? App Access App Authenticate Authorize
  • 6. ​ OAuth allows a client application restricted access to your data at a resource server via tokens issued by an authorization server in response to your authorization. ​ Token Types: Authorization Code short-lived token created by the authorization server and passed to the client application via the browser. Access Token The access token is used by the client to make authenticated requests on behalf of the end user. Refresh Token The refresh token may have an indefinite lifetime oAuth
  • 8. Web Server Flow ​ Most web apps would use a web-server flow to obtain a token on behalf of the end-user
  • 9. Authenticate, Authorize Client Parameter Description response_type Must be set to code to request an authorization code. client_id Your application's client identifier (consumer key in Connected App Detail). redirect_uri The end user's browser will be redirected to this URI with the authorization code. This must match your application's configured callback URL.
  • 10. Token Response Parameter Description code The value returned by the authorization server in the previous step. grant_type Set this to authorization_code. client_id Your application's client identifier. client_secret Your application's client secret (consumer secret in the connected app detail page). redirect_uri Again, this must match your application's configuration.
  • 11. Web Server Flow: Response Parameter Description id A URL, representing the authenticated user, which can be used to access the Identity Service. instance_url Identifies the Salesforce instance refresh_token A long-lived token that may be used to obtain a fresh access token access_token The short-lived access token.
  • 12. Web Server Flow - Response ​ Sample Response
  • 13. User Agent Flow ​ The user agent flow allows client applications running on user’s browser to obtain an access token
  • 14. Request Token Parameter Description response_type Value can be token, or token id_token with the scope parameter openid and a nonce parameter client_id Your application's client identifier (consumer key in Connected App Detail). redirect_uri The end user's browser will be redirected to this URI with the authorization code. This must match your application's configured callback URL.
  • 15. User Agent Flow: Response Parameter Description id A URL, representing the authenticated user, which can be used to access the Identity Service. instance_url Identifies the Salesforce instance refresh_token A long-lived token that may be used to obtain a fresh access token access_token The short-lived access token.
  • 16. Token Refresh ​ Once the lifetime of a token expires, the client application can use the refresh token to obtain a new access token
  • 17. Request Token Parameter Description grant_type Set this to refresh_token. client_id Your application's client identifier. client_secret Your application's client secret (optional). refresh_token The refresh token provided in the previous authorization.
  • 18. Token Refresh: Response Parameter Description id A URL, representing the authenticated user, which can be used to access the Identity Service. instance_url Identifies the Salesforce instance refresh_token A long-lived token that may be used to obtain a fresh access token access_token The short-lived access token.
  • 19. Demo
  • 20. Demo ​ Connected App ​ Web Server Flow: •  Send request to get token •  Send token to get Access Token •  Use Access Token to query data
  • 22. Wrap Up ​ What we covered: •  oAuth Basics •  oAuth Implementation Flows •  Demo ​ More Info: •  Salesforce oAuth Documentation