Linkedin & OAuth

Umang Goyal
Umang GoyalPartnerships & Business Development at InMobi
OAuth & LinkedIn
Why Should We Integrate
LinkedIn?
• Users can bring their LinkedIn profile and
network in your site
• Access to a network of over 80 million users
• Authentication to your site using LinkedIn APIs
• Search for profiles, connections
• Update LinkedIn status from your site
And many more….
LinkedIn Platform Guidelines
• No LinkedIn data can be stored
– Exceptions: Storing the Member ID for subsequent API calls & User’s profile data
when given explicit user permission by the owner of the profile
• Don't share your API keys and secrets with anyone
• Data gathered from one user's LinkedIn account/network may not be
exposed to another user
• You must show the agreement screen in its own window
– URL is visible
– Same browser window/tab or pop-up but NOT an Iframe into the current page
• You cannot provide API access to your customers
• http://developer.linkedin.com/docs/DOC-1091
LinkedIn OAuth's Authentication
Model
• You get an API key from LinkedIn. (Consumer Key in OAuth terminology)
• You build a feature into your site that leverages the user's LinkedIn network
• Your user clicks on your UI to request to use that feature.
• You make a call to LinkedIn to ask to use our authentication. This is called getting a Request Token.
• LinkedIn replies with an OAuth Token indicating that you can use the authentication system.
• You send your user to a LinkedIn URL. That URL includes the OAuth Token you got and a few other parameters
such as a URL for LinkedIn to return the user to after granting access.
• The user grants access to your application by signing into that page.
• Upon successful signon, LinkedIn will return the user to your site.
• You will then make a call to LinkedIn to get an Access Token.
• LinkedIn replies with an Access Token for the user. You use that Access Token for any API calls to LinkedIn to
identify the user on whose behalf you are making the call.
Linkedin & OAuth
Anatomy of an OAuth Request
1. Establish a requestToken
– HTTP Method (POST)
– Request URI (https://api.linkedin.com/uas/oauth/requestToken)
– oauth_callback
– oauth_consumer_key
– oauth_nonce
– oauth_signature_method
– oauth_timestamp
– oauth_version
Sample response:
oauth_token=94ab03c4-ae2c-45e4-8732-
0e6c4899db63&oauth_token_secret=be6ccb24-bf0a-4ea8-a4b1-
0a70508e452b&oauth_callback_confirmed=true&oauth_expire
s_in=599
Anatomy of an OAuth Request
2. Redirect the User to our Authorization Server
• Forward the user to LinkedIn’s authorization server where they'll
authorize your application
• User decides whether to authorize your application or deny the
request using our standard authenication screen
• One Click Login - Automatically (and immediately) redirect to the
callback URL, if
a. The current user is logged into LinkedIn.
b. The current user has already granted an access token to your application.
c. The access token has not expired.
http://localhost/oauth_callback?oauth_token=94ab03c4-ae2c-45e4-8732-0e6c4899db63&
oauth_verifier=98295
• Cancel Button - either the "Integration URL" you defined for your
application, or, if that value is blank, the OAuth callback URL
Anatomy of an OAuth Request
3. Request the Access Token
• Last step - Obtain an access token that actually gives you the agency to make requests
on behalf of the LinkedIn member.
– HTTP Method (POST)
– Request URI (https://api.linkedin.com/uas/oauth/accessToken)
– oauth_consumer_key
– oauth_nonce
– oauth_signature_method
– oauth_timestamp
– oauth_token
– oauth_verifier
– oauth_version
• As a response to your request for an accessToken, your accessToken will be in the
"oauth_token" field and an oauth_token_secret.
oauth_token=f862f658-ad89-4fcb-995b-7a4c50554ff6&oauth_token_secret=a252d40e-f7f0-
4f31-a362-3451e168d5a5
4. Signing out
LinkedIn API
• People
– Profile API
• http://api.linkedin.com/v1/people/~
• http://api.linkedin.com/v1/people/id=abcdefg
• http://api.linkedin.com/v1/people/url=<public-profile-url>
– Connections API
• http://api.linkedin.com/v1/people/~/connections
– People Search API
• Network Updates / Status
– Get Network Updates API
– Post Network Updates
– Commenting on & Reading Comments in Network Updates
– Share API
• Communications
– Messaging Between Connections
– Invitation API
Throttle Limits
• Designed to ensure maximum performance for all developers and to protect the user experience
of all users on LinkedIn.
• Three types of throttles applied to all API keys:
– Application throttles: Limit the number of each API call your application can make using its API key.
– User throttles: Limit the number of calls for any individual user of your application.
– Developer throttles: For people listed as developers on their API keys. Approximately four times higher
than the user throttles for most calls.
• Throttled Responses
– 403 HTTP status code with a response body containing an XML document.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<error>
<status>403</status>
<timestamp>1264619093714</timestamp>
<error-code>0000</error-code>
<message>Throttle limit for calls to this resource is reached.</message>
</error>
Linkedin & OAuth
Linkedin & OAuth
1 de 12

Recomendados

OAuth2 and LinkedIn por
OAuth2 and LinkedInOAuth2 and LinkedIn
OAuth2 and LinkedInKamyar Mohager
10.9K vistas21 diapositivas
A simple PHP LinkedIn OAuth 2.0 example por
A simple PHP LinkedIn OAuth 2.0 exampleA simple PHP LinkedIn OAuth 2.0 example
A simple PHP LinkedIn OAuth 2.0 exampleMattia Reggiani
4.6K vistas16 diapositivas
LinkedIn OAuth: Zero To Hero por
LinkedIn OAuth: Zero To HeroLinkedIn OAuth: Zero To Hero
LinkedIn OAuth: Zero To HeroTaylor Singletary
37.8K vistas35 diapositivas
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013 por
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Aaron Parecki
6.5K vistas47 diapositivas
OAuth in the new .NET world (OWIN) por
OAuth in the new .NET world (OWIN)OAuth in the new .NET world (OWIN)
OAuth in the new .NET world (OWIN)Emad Alashi
7.7K vistas23 diapositivas
OAuth 2 por
OAuth 2OAuth 2
OAuth 2ChrisWood262
363 vistas20 diapositivas

Más contenido relacionado

La actualidad más candente

Oauth2 and OWSM OAuth2 support por
Oauth2 and OWSM OAuth2 supportOauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportGaurav Sharma
4K vistas45 diapositivas
OAuth - Open API Authentication por
OAuth - Open API AuthenticationOAuth - Open API Authentication
OAuth - Open API Authenticationleahculver
22.3K vistas23 diapositivas
O auth2 with angular js por
O auth2 with angular jsO auth2 with angular js
O auth2 with angular jsBixlabs
424 vistas51 diapositivas
Securing your APIs with OAuth, OpenID, and OpenID Connect por
Securing your APIs with OAuth, OpenID, and OpenID ConnectSecuring your APIs with OAuth, OpenID, and OpenID Connect
Securing your APIs with OAuth, OpenID, and OpenID ConnectManish Pandit
4K vistas54 diapositivas
OAuth Tokens por
OAuth TokensOAuth Tokens
OAuth Tokensn|u - The Open Security Community
946 vistas12 diapositivas
Mohanraj - Securing Your Web Api With OAuth por
Mohanraj - Securing Your Web Api With OAuthMohanraj - Securing Your Web Api With OAuth
Mohanraj - Securing Your Web Api With OAuthfossmy
2.1K vistas29 diapositivas

La actualidad más candente(20)

Oauth2 and OWSM OAuth2 support por Gaurav Sharma
Oauth2 and OWSM OAuth2 supportOauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 support
Gaurav Sharma4K vistas
OAuth - Open API Authentication por leahculver
OAuth - Open API AuthenticationOAuth - Open API Authentication
OAuth - Open API Authentication
leahculver22.3K vistas
O auth2 with angular js por Bixlabs
O auth2 with angular jsO auth2 with angular js
O auth2 with angular js
Bixlabs 424 vistas
Securing your APIs with OAuth, OpenID, and OpenID Connect por Manish Pandit
Securing your APIs with OAuth, OpenID, and OpenID ConnectSecuring your APIs with OAuth, OpenID, and OpenID Connect
Securing your APIs with OAuth, OpenID, and OpenID Connect
Manish Pandit4K vistas
Mohanraj - Securing Your Web Api With OAuth por fossmy
Mohanraj - Securing Your Web Api With OAuthMohanraj - Securing Your Web Api With OAuth
Mohanraj - Securing Your Web Api With OAuth
fossmy2.1K vistas
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or... por Brian Campbell
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
Brian Campbell62.2K vistas
OAuth2 & OpenID Connect por Marcin Wolnik
OAuth2 & OpenID ConnectOAuth2 & OpenID Connect
OAuth2 & OpenID Connect
Marcin Wolnik592 vistas
Best Practices in Building an API Security Ecosystem por Prabath Siriwardena
Best Practices in Building an API Security EcosystemBest Practices in Building an API Security Ecosystem
Best Practices in Building an API Security Ecosystem
Prabath Siriwardena1.4K vistas
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud por Danny Jessee
SharePoint 2010, Claims-Based Identity, Facebook, and the CloudSharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
Danny Jessee7.8K vistas
Claims-Based Identity in SharePoint 2010 por Danny Jessee
Claims-Based Identity in SharePoint 2010Claims-Based Identity in SharePoint 2010
Claims-Based Identity in SharePoint 2010
Danny Jessee6.3K vistas
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud por Danny Jessee
SharePoint 2010, Claims-Based Identity, Facebook, and the CloudSharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
Danny Jessee6.3K vistas
Rest API Security por Stormpath
Rest API SecurityRest API Security
Rest API Security
Stormpath11.7K vistas
API Security & Federation Patterns - Francois Lascelles, Chief Architect, Lay... por CA API Management
API Security & Federation Patterns - Francois Lascelles, Chief Architect, Lay...API Security & Federation Patterns - Francois Lascelles, Chief Architect, Lay...
API Security & Federation Patterns - Francois Lascelles, Chief Architect, Lay...
CA API Management4.1K vistas

Destacado

How to automate boring public relations tasks por
How to automate boring public relations tasksHow to automate boring public relations tasks
How to automate boring public relations tasksPrezly
24K vistas26 diapositivas
Practical Core Bluetooth in IoT & Wearable projects @ AltConf 2016 por
Practical Core Bluetooth in IoT & Wearable projects @ AltConf 2016Practical Core Bluetooth in IoT & Wearable projects @ AltConf 2016
Practical Core Bluetooth in IoT & Wearable projects @ AltConf 2016Shuichi Tsutsumi
2.4K vistas259 diapositivas
5 Inbound Marketing Hacks - Ben Lang KahenaCon por
5 Inbound Marketing Hacks - Ben Lang KahenaCon5 Inbound Marketing Hacks - Ben Lang KahenaCon
5 Inbound Marketing Hacks - Ben Lang KahenaConBen Lang
4K vistas41 diapositivas
10 Marketing Hacks To Boost Your Startup por
10 Marketing Hacks To Boost Your Startup10 Marketing Hacks To Boost Your Startup
10 Marketing Hacks To Boost Your StartupBen Lang
12.8K vistas52 diapositivas
Slideshare Doc por
Slideshare DocSlideshare Doc
Slideshare Docguest42d805
3.9K vistas6 diapositivas
API提供におけるOAuthの役割 #apijp por
API提供におけるOAuthの役割 #apijpAPI提供におけるOAuthの役割 #apijp
API提供におけるOAuthの役割 #apijpTatsuo Kudo
10.9K vistas39 diapositivas

Destacado(9)

How to automate boring public relations tasks por Prezly
How to automate boring public relations tasksHow to automate boring public relations tasks
How to automate boring public relations tasks
Prezly24K vistas
Practical Core Bluetooth in IoT & Wearable projects @ AltConf 2016 por Shuichi Tsutsumi
Practical Core Bluetooth in IoT & Wearable projects @ AltConf 2016Practical Core Bluetooth in IoT & Wearable projects @ AltConf 2016
Practical Core Bluetooth in IoT & Wearable projects @ AltConf 2016
Shuichi Tsutsumi2.4K vistas
5 Inbound Marketing Hacks - Ben Lang KahenaCon por Ben Lang
5 Inbound Marketing Hacks - Ben Lang KahenaCon5 Inbound Marketing Hacks - Ben Lang KahenaCon
5 Inbound Marketing Hacks - Ben Lang KahenaCon
Ben Lang4K vistas
10 Marketing Hacks To Boost Your Startup por Ben Lang
10 Marketing Hacks To Boost Your Startup10 Marketing Hacks To Boost Your Startup
10 Marketing Hacks To Boost Your Startup
Ben Lang12.8K vistas
Slideshare Doc por guest42d805
Slideshare DocSlideshare Doc
Slideshare Doc
guest42d8053.9K vistas
API提供におけるOAuthの役割 #apijp por Tatsuo Kudo
API提供におけるOAuthの役割 #apijpAPI提供におけるOAuthの役割 #apijp
API提供におけるOAuthの役割 #apijp
Tatsuo Kudo10.9K vistas
Cool tools for recruiting 2012 craig fisher lashrm por Craig Fisher
Cool tools for recruiting 2012 craig fisher lashrmCool tools for recruiting 2012 craig fisher lashrm
Cool tools for recruiting 2012 craig fisher lashrm
Craig Fisher1.9K vistas
Advanced PHPUnit Testing por Mike Lively
Advanced PHPUnit TestingAdvanced PHPUnit Testing
Advanced PHPUnit Testing
Mike Lively23.6K vistas

Similar a Linkedin & OAuth

Mobile Authentication - Onboarding, best practices & anti-patterns por
Mobile Authentication - Onboarding, best practices & anti-patternsMobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patternsPieter Ennes
1.2K vistas37 diapositivas
Api security por
Api security Api security
Api security teodorcotruta
750 vistas38 diapositivas
OAuth por
OAuthOAuth
OAuthTom Elrod
108 vistas26 diapositivas
Intro to OAuth2 and OpenID Connect por
Intro to OAuth2 and OpenID ConnectIntro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectLiamWadman
141 vistas15 diapositivas
Social Single Sign-On with OpenID Connect por
Social Single Sign-On with OpenID ConnectSocial Single Sign-On with OpenID Connect
Social Single Sign-On with OpenID ConnectJames Melville
573 vistas14 diapositivas
.NET Core, ASP.NET Core Course, Session 19 por
 .NET Core, ASP.NET Core Course, Session 19 .NET Core, ASP.NET Core Course, Session 19
.NET Core, ASP.NET Core Course, Session 19aminmesbahi
475 vistas49 diapositivas

Similar a Linkedin & OAuth(20)

Mobile Authentication - Onboarding, best practices & anti-patterns por Pieter Ennes
Mobile Authentication - Onboarding, best practices & anti-patternsMobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patterns
Pieter Ennes1.2K vistas
Intro to OAuth2 and OpenID Connect por LiamWadman
Intro to OAuth2 and OpenID ConnectIntro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID Connect
LiamWadman141 vistas
Social Single Sign-On with OpenID Connect por James Melville
Social Single Sign-On with OpenID ConnectSocial Single Sign-On with OpenID Connect
Social Single Sign-On with OpenID Connect
James Melville573 vistas
.NET Core, ASP.NET Core Course, Session 19 por aminmesbahi
 .NET Core, ASP.NET Core Course, Session 19 .NET Core, ASP.NET Core Course, Session 19
.NET Core, ASP.NET Core Course, Session 19
aminmesbahi475 vistas
Stateless Auth using OAUTH2 & JWT por Mobiliya
Stateless Auth using OAUTH2 & JWTStateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWT
Mobiliya1K vistas
oauth-for-credentials-security-in-rest-api-access por idsecconf
oauth-for-credentials-security-in-rest-api-accessoauth-for-credentials-security-in-rest-api-access
oauth-for-credentials-security-in-rest-api-access
idsecconf491 vistas
Spring Social - Messaging Friends & Influencing People por Gordon Dickens
Spring Social - Messaging Friends & Influencing PeopleSpring Social - Messaging Friends & Influencing People
Spring Social - Messaging Friends & Influencing People
Gordon Dickens6.8K vistas
Stateless Auth using OAuth2 & JWT por Gaurav Roy
Stateless Auth using OAuth2 & JWTStateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWT
Gaurav Roy11.5K vistas
Keycloak for Science Gateways - SGCI Technology Sampler Webinar por marcuschristie
Keycloak for Science Gateways - SGCI Technology Sampler WebinarKeycloak for Science Gateways - SGCI Technology Sampler Webinar
Keycloak for Science Gateways - SGCI Technology Sampler Webinar
marcuschristie356 vistas
Linkedin OAuth for curious people por Rory Cawley
Linkedin OAuth for curious peopleLinkedin OAuth for curious people
Linkedin OAuth for curious people
Rory Cawley2.9K vistas
UC2013 Speed Geeking: Intro to OAuth2 por Aaron Parecki
UC2013 Speed Geeking: Intro to OAuth2UC2013 Speed Geeking: Intro to OAuth2
UC2013 Speed Geeking: Intro to OAuth2
Aaron Parecki3.7K vistas
OAuth 2.0 and OpenID Connect por Jacob Combs
OAuth 2.0 and OpenID ConnectOAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID Connect
Jacob Combs243 vistas
Ember Authentication and Authorization with Torii por Cory Forsyth
Ember Authentication and Authorization with ToriiEmber Authentication and Authorization with Torii
Ember Authentication and Authorization with Torii
Cory Forsyth1.7K vistas
Implementing OpenID for Your Social Networking Site por David Keener
Implementing OpenID for Your Social Networking SiteImplementing OpenID for Your Social Networking Site
Implementing OpenID for Your Social Networking Site
David Keener1.6K vistas
Secure your app with keycloak por Guy Marom
Secure your app with keycloakSecure your app with keycloak
Secure your app with keycloak
Guy Marom865 vistas

Último

GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... por
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...James Anderson
92 vistas32 diapositivas
Igniting Next Level Productivity with AI-Infused Data Integration Workflows por
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Safe Software
280 vistas86 diapositivas
"Running students' code in isolation. The hard way", Yurii Holiuk por
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk Fwdays
17 vistas34 diapositivas
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 por
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院IttrainingIttraining
58 vistas8 diapositivas
Mini-Track: AI and ML in Network Operations Applications por
Mini-Track: AI and ML in Network Operations ApplicationsMini-Track: AI and ML in Network Operations Applications
Mini-Track: AI and ML in Network Operations ApplicationsNetwork Automation Forum
10 vistas24 diapositivas
SUPPLIER SOURCING.pptx por
SUPPLIER SOURCING.pptxSUPPLIER SOURCING.pptx
SUPPLIER SOURCING.pptxangelicacueva6
16 vistas1 diapositiva

Último(20)

GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... por James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson92 vistas
Igniting Next Level Productivity with AI-Infused Data Integration Workflows por Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software280 vistas
"Running students' code in isolation. The hard way", Yurii Holiuk por Fwdays
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk
Fwdays17 vistas
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 por IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
Piloting & Scaling Successfully With Microsoft Viva por Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
Richard Harbridge12 vistas
SAP Automation Using Bar Code and FIORI.pdf por Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
Virendra Rai, PMP23 vistas
Voice Logger - Telephony Integration Solution at Aegis por Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma39 vistas
Powerful Google developer tools for immediate impact! (2023-24) por wesley chun
Powerful Google developer tools for immediate impact! (2023-24)Powerful Google developer tools for immediate impact! (2023-24)
Powerful Google developer tools for immediate impact! (2023-24)
wesley chun10 vistas
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive por Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... por Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
Jasper Oosterveld19 vistas
Unit 1_Lecture 2_Physical Design of IoT.pdf por StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec12 vistas
Case Study Copenhagen Energy and Business Central.pdf por Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana16 vistas
PharoJS - Zürich Smalltalk Group Meetup November 2023 por Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi132 vistas

Linkedin & OAuth

  • 2. Why Should We Integrate LinkedIn? • Users can bring their LinkedIn profile and network in your site • Access to a network of over 80 million users • Authentication to your site using LinkedIn APIs • Search for profiles, connections • Update LinkedIn status from your site And many more….
  • 3. LinkedIn Platform Guidelines • No LinkedIn data can be stored – Exceptions: Storing the Member ID for subsequent API calls & User’s profile data when given explicit user permission by the owner of the profile • Don't share your API keys and secrets with anyone • Data gathered from one user's LinkedIn account/network may not be exposed to another user • You must show the agreement screen in its own window – URL is visible – Same browser window/tab or pop-up but NOT an Iframe into the current page • You cannot provide API access to your customers • http://developer.linkedin.com/docs/DOC-1091
  • 4. LinkedIn OAuth's Authentication Model • You get an API key from LinkedIn. (Consumer Key in OAuth terminology) • You build a feature into your site that leverages the user's LinkedIn network • Your user clicks on your UI to request to use that feature. • You make a call to LinkedIn to ask to use our authentication. This is called getting a Request Token. • LinkedIn replies with an OAuth Token indicating that you can use the authentication system. • You send your user to a LinkedIn URL. That URL includes the OAuth Token you got and a few other parameters such as a URL for LinkedIn to return the user to after granting access. • The user grants access to your application by signing into that page. • Upon successful signon, LinkedIn will return the user to your site. • You will then make a call to LinkedIn to get an Access Token. • LinkedIn replies with an Access Token for the user. You use that Access Token for any API calls to LinkedIn to identify the user on whose behalf you are making the call.
  • 6. Anatomy of an OAuth Request 1. Establish a requestToken – HTTP Method (POST) – Request URI (https://api.linkedin.com/uas/oauth/requestToken) – oauth_callback – oauth_consumer_key – oauth_nonce – oauth_signature_method – oauth_timestamp – oauth_version Sample response: oauth_token=94ab03c4-ae2c-45e4-8732- 0e6c4899db63&oauth_token_secret=be6ccb24-bf0a-4ea8-a4b1- 0a70508e452b&oauth_callback_confirmed=true&oauth_expire s_in=599
  • 7. Anatomy of an OAuth Request 2. Redirect the User to our Authorization Server • Forward the user to LinkedIn’s authorization server where they'll authorize your application • User decides whether to authorize your application or deny the request using our standard authenication screen • One Click Login - Automatically (and immediately) redirect to the callback URL, if a. The current user is logged into LinkedIn. b. The current user has already granted an access token to your application. c. The access token has not expired. http://localhost/oauth_callback?oauth_token=94ab03c4-ae2c-45e4-8732-0e6c4899db63& oauth_verifier=98295 • Cancel Button - either the "Integration URL" you defined for your application, or, if that value is blank, the OAuth callback URL
  • 8. Anatomy of an OAuth Request 3. Request the Access Token • Last step - Obtain an access token that actually gives you the agency to make requests on behalf of the LinkedIn member. – HTTP Method (POST) – Request URI (https://api.linkedin.com/uas/oauth/accessToken) – oauth_consumer_key – oauth_nonce – oauth_signature_method – oauth_timestamp – oauth_token – oauth_verifier – oauth_version • As a response to your request for an accessToken, your accessToken will be in the "oauth_token" field and an oauth_token_secret. oauth_token=f862f658-ad89-4fcb-995b-7a4c50554ff6&oauth_token_secret=a252d40e-f7f0- 4f31-a362-3451e168d5a5 4. Signing out
  • 9. LinkedIn API • People – Profile API • http://api.linkedin.com/v1/people/~ • http://api.linkedin.com/v1/people/id=abcdefg • http://api.linkedin.com/v1/people/url=<public-profile-url> – Connections API • http://api.linkedin.com/v1/people/~/connections – People Search API • Network Updates / Status – Get Network Updates API – Post Network Updates – Commenting on & Reading Comments in Network Updates – Share API • Communications – Messaging Between Connections – Invitation API
  • 10. Throttle Limits • Designed to ensure maximum performance for all developers and to protect the user experience of all users on LinkedIn. • Three types of throttles applied to all API keys: – Application throttles: Limit the number of each API call your application can make using its API key. – User throttles: Limit the number of calls for any individual user of your application. – Developer throttles: For people listed as developers on their API keys. Approximately four times higher than the user throttles for most calls. • Throttled Responses – 403 HTTP status code with a response body containing an XML document. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <error> <status>403</status> <timestamp>1264619093714</timestamp> <error-code>0000</error-code> <message>Throttle limit for calls to this resource is reached.</message> </error>