SlideShare a Scribd company logo
Using Oauth2 with
    LinkedIn
     Kamyar Mohager  
  LinkedIn Platform Team
             



                     
      
   Developer Relations
Why bother
authorizing?



           
    
   Developer Relations
Not secure




              Developer Relations
We need a way to
connect our LinkedIn
 identity securely to
   an application… 



               
   
   Developer Relations
OAuth 1.0a




              Developer Relations
Secure, but…
•  Relies on a calculated signature to ensure
  security between server and consumer
•  Secure for end user but pain for
  developer to implement
•  Difficult to debug 401 unauthorized when
  signature is bad (nonce, timestamp, etc)
•  Not all OAuth libraries are created equal

                                      Developer Relations
OAuth 1.0a Signature
Signature Base String	
POST&https%3A%2F%2Fapi.linkedin.com%2Fv1%2Fpeople%2F~
%2Fshares&oauth_consumer_key%3Dmy1sh8ponem4%26oauth_nonce%3D511F013D-
C950-46EF-B8FF-DE48AA6708D8%26oauth_signature_method%3DHMAC-
SHA1%26oauth_timestamp%3D1355356360%26oauth_token%3D935e5a8b-4787-4792-
a377-4b0e8bae5029%26oauth_version%3D1.0	
	
Signature	
wUGmSixTSUTTKA92Ytxj6rMeAAM=	
	
HTTP Authentication Header	
OAuth oauth_nonce="511F013D-C950-46EF-B8FF-DE48AA6708D8"
oauth_timestamp="1355356360" oauth_version="1.0"
oauth_signature_method="HMAC-SHA1" oauth_consumer_key=”XXXXXXXXX"
oauth_token="935e5a8b-4787-4792-a377-4b0e8bae5029"
oauth_signature="wUGmSixTSUTTKA92Ytxj6rMeAAM%3D"	
	
URL	
https://api.linkedin.com/v1/people/~/shares	




                                                             Developer Relations
OAuth 2.0
•  Easier to code
•  Relies on SSL instead of complicated
  signatures
•  Still provides secure authorization for
  end user
•  Supports scopes for granular member
  permissions


                                      Developer Relations
LinkedIn + OAuth 2.0

  How easy is it to authorize a
   LinkedIn user to my app??  




                                  Developer Relations
Step 1

REGISTER YOUR APP




                     Developer Relations
Go to https://www.linkedin.com/secure/developer 
               to register your app




                                       Developer Relations
Step 2

GET AN AUTHORIZATION CODE




                             Developer Relations
Redirect user to login
       dialog




                    Developer Relations
User grants access
                 




                 Developer Relations
The redirected URL




                  Developer Relations
Step 3

UPGRADE AUTH CODE FOR AN ACCESS
TOKEN



                           Developer Relations
It’s all about SSL




                      Developer Relations
You’re auth’d


Response




                             Developer Relations
So what’s the gist of all
         this?

  https://gist.github.com/4028833




                                Developer Relations
Open Source Libraries

•  https://github.com/intridea/oauth2
  (ruby)
•  https://github.com/litl/rauth (python)
•  https://github.com/adoy/PHP-OAuth2
  (php)
•  http://www.springsource.org/spring-
  social (java)
                                     Developer Relations
Questions?"
 Thanks!




              Developer Relations

More Related Content

PPT
Linkedin & OAuth
PPTX
A simple PHP LinkedIn OAuth 2.0 example
KEY
LinkedIn OAuth: Zero To Hero
PPTX
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
PPTX
OAuth in the new .NET world (OWIN)
PPTX
PDF
Intro to API Security with Oauth 2.0
PPTX
OAuth 2 Presentation
Linkedin & OAuth
A simple PHP LinkedIn OAuth 2.0 example
LinkedIn OAuth: Zero To Hero
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
OAuth in the new .NET world (OWIN)
Intro to API Security with Oauth 2.0
OAuth 2 Presentation

What's hot (15)

ODP
Mohanraj - Securing Your Web Api With OAuth
PPTX
Securing your APIs with OAuth, OpenID, and OpenID Connect
PDF
The Many Flavors of OAuth - Understand Everything About OAuth2
PPTX
UC2013 Speed Geeking: Intro to OAuth2
PPTX
O auth2 with angular js
PPTX
Securing RESTful Payment APIs Using OAuth 2
PPTX
Microservice with OAuth2
PPTX
OAuth2 & OpenID Connect
KEY
OAuth Introduction
PPTX
Creating a Sign On with Open id connect
PDF
Introduction to OAuth 2.0 - Part 2
PDF
User Management with LastUser
PPT
OAuth 2.0 and OpenId Connect
PDF
Building an API Security Ecosystem
PDF
Introduction to SAML 2.0
Mohanraj - Securing Your Web Api With OAuth
Securing your APIs with OAuth, OpenID, and OpenID Connect
The Many Flavors of OAuth - Understand Everything About OAuth2
UC2013 Speed Geeking: Intro to OAuth2
O auth2 with angular js
Securing RESTful Payment APIs Using OAuth 2
Microservice with OAuth2
OAuth2 & OpenID Connect
OAuth Introduction
Creating a Sign On with Open id connect
Introduction to OAuth 2.0 - Part 2
User Management with LastUser
OAuth 2.0 and OpenId Connect
Building an API Security Ecosystem
Introduction to SAML 2.0
Ad

Similar to OAuth2 and LinkedIn (20)

PDF
Linkedin OAuth for curious people
PPTX
SSO with Social Login Integration & FastAPI Simplified
PPTX
API Management and Mobile App Enablement
KEY
OAuth 2.0
PPTX
OAuth - Don’t Throw the Baby Out with the Bathwater
PDF
OAuth and OEmbed
PPTX
OAuth
PDF
oauth-for-credentials-security-in-rest-api-access
PPTX
Enterprise Access Control Patterns for Rest and Web APIs
PPT
Oauth2.0
PDF
A How-to Guide to OAuth & API Security
PDF
Secure Webservices
PPTX
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
PPTX
Demystifying REST
PDF
Implementing open authentication_in_your_app
PDF
OpenID and OAuth
PDF
Distributed Identities with OpenID
Linkedin OAuth for curious people
SSO with Social Login Integration & FastAPI Simplified
API Management and Mobile App Enablement
OAuth 2.0
OAuth - Don’t Throw the Baby Out with the Bathwater
OAuth and OEmbed
OAuth
oauth-for-credentials-security-in-rest-api-access
Enterprise Access Control Patterns for Rest and Web APIs
Oauth2.0
A How-to Guide to OAuth & API Security
Secure Webservices
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
Demystifying REST
Implementing open authentication_in_your_app
OpenID and OAuth
Distributed Identities with OpenID
Ad

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
A Presentation on Artificial Intelligence
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Modernizing your data center with Dell and AMD
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Approach and Philosophy of On baking technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Cloud computing and distributed systems.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Encapsulation_ Review paper, used for researhc scholars
Unlocking AI with Model Context Protocol (MCP)
A Presentation on Artificial Intelligence
Reach Out and Touch Someone: Haptics and Empathic Computing
Mobile App Security Testing_ A Comprehensive Guide.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Chapter 3 Spatial Domain Image Processing.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Modernizing your data center with Dell and AMD
Advanced methodologies resolving dimensionality complications for autism neur...
“AI and Expert System Decision Support & Business Intelligence Systems”
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
Spectral efficient network and resource selection model in 5G networks
The Rise and Fall of 3GPP – Time for a Sabbatical?
Approach and Philosophy of On baking technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Cloud computing and distributed systems.
20250228 LYD VKU AI Blended-Learning.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Encapsulation_ Review paper, used for researhc scholars

OAuth2 and LinkedIn

  • 1. Using Oauth2 with LinkedIn Kamyar Mohager LinkedIn Platform Team Developer Relations
  • 2. Why bother authorizing? Developer Relations
  • 3. Not secure Developer Relations
  • 4. We need a way to connect our LinkedIn identity securely to an application… Developer Relations
  • 5. OAuth 1.0a Developer Relations
  • 6. Secure, but… •  Relies on a calculated signature to ensure security between server and consumer •  Secure for end user but pain for developer to implement •  Difficult to debug 401 unauthorized when signature is bad (nonce, timestamp, etc) •  Not all OAuth libraries are created equal Developer Relations
  • 7. OAuth 1.0a Signature Signature Base String POST&https%3A%2F%2Fapi.linkedin.com%2Fv1%2Fpeople%2F~ %2Fshares&oauth_consumer_key%3Dmy1sh8ponem4%26oauth_nonce%3D511F013D- C950-46EF-B8FF-DE48AA6708D8%26oauth_signature_method%3DHMAC- SHA1%26oauth_timestamp%3D1355356360%26oauth_token%3D935e5a8b-4787-4792- a377-4b0e8bae5029%26oauth_version%3D1.0 Signature wUGmSixTSUTTKA92Ytxj6rMeAAM= HTTP Authentication Header OAuth oauth_nonce="511F013D-C950-46EF-B8FF-DE48AA6708D8" oauth_timestamp="1355356360" oauth_version="1.0" oauth_signature_method="HMAC-SHA1" oauth_consumer_key=”XXXXXXXXX" oauth_token="935e5a8b-4787-4792-a377-4b0e8bae5029" oauth_signature="wUGmSixTSUTTKA92Ytxj6rMeAAM%3D" URL https://api.linkedin.com/v1/people/~/shares Developer Relations
  • 8. OAuth 2.0 •  Easier to code •  Relies on SSL instead of complicated signatures •  Still provides secure authorization for end user •  Supports scopes for granular member permissions Developer Relations
  • 9. LinkedIn + OAuth 2.0 How easy is it to authorize a LinkedIn user to my app?? Developer Relations
  • 10. Step 1 REGISTER YOUR APP Developer Relations
  • 11. Go to https://www.linkedin.com/secure/developer to register your app Developer Relations
  • 12. Step 2 GET AN AUTHORIZATION CODE Developer Relations
  • 13. Redirect user to login dialog Developer Relations
  • 14. User grants access Developer Relations
  • 15. The redirected URL Developer Relations
  • 16. Step 3 UPGRADE AUTH CODE FOR AN ACCESS TOKEN Developer Relations
  • 17. It’s all about SSL Developer Relations
  • 18. You’re auth’d Response Developer Relations
  • 19. So what’s the gist of all this? https://gist.github.com/4028833 Developer Relations
  • 20. Open Source Libraries •  https://github.com/intridea/oauth2 (ruby) •  https://github.com/litl/rauth (python) •  https://github.com/adoy/PHP-OAuth2 (php) •  http://www.springsource.org/spring- social (java) Developer Relations
  • 21. Questions?" Thanks! Developer Relations