The OAuth 2.0 Authorization Framework

Samuele Cozzi
Samuele CozziSolution Architect at Sopra Group en Sopra Steria
Introduction to OAuth 2.0
RFC 6749 - Simplified
RFC 6749 -The OAuth 2.0
Authorization Framework
Actors
Resource Owner
An entity capable of granting access to a protected
resource.
When the resource owner is a person, it is referred to
as an end-user
Resource Server
The server hosting the protected resources, capable of
accepting and responding to protected resource
requests using access tokens
Authorization Server
The server issuing access tokens to the client after
successfully authenticating the resource owner and
obtaining authorization.
Client
An application making protected resource requests on
behalf of the resource owner and with its authorization.
The term "client" does not imply any particular
implementation characteristics (e.g., whether the
application executes on a server, a desktop, or other
devices).
ClientTypes
Confidential
Clients capable of maintaining the confidentiality of their credentials (e.g., client
implemented on a secure server with restricted access to the client credentials), or
capable of secure client authentication using other means.
Web Application
User-Agent-Based
Application
Public
Clients incapable of maintaining the confidentiality
of their credentials (e.g., clients executing on the
device used by the resource owner, such as an
installed native application or a web browser-based
application), and incapable of secure client
authentication via any other means.
Native Apllication
Protocol Flow
Authorization
Grant Authorization
Request
Access
Token Authorization
Grant
Protected
Reource AccessToken
Protocol Endpoints
The authorization
endpoint is used to
interact with the
resource owner and
obtain an
authorization grant.
Authorization The token endpoint is
used by the client to
obtain an access
token by presenting
its authorization grant
or refresh token.
Token
Authorization Endpoint
The authorization endpoint is used to interact with the resource owner and obtain an
authorization grant. The authorization server MUST first verify the identity of the
resource owner.
the authorization server MAY support including the client credentials in the request-
body using the following parameters:
• client_id
REQUIRED. The client identifier issued to the client during the registration process described by
Section 2.2.
• client_secret
REQUIRED. The client secret. The client MAY omit the parameter if the client secret is an empty
string.
POST /token HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
grant_type=refresh_token
&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA
&client_id=s6BhdRkqt3
&client_secret=7Fjfp0ZBr1KtDRbnfVdmIw
Token Endpoint
Authorization
Code
Implicit
Resource Owner
Password
Credentials
Client Credential
Authorization Code
3
1
22
1 3
4
5
Authorization Code
1. The client initiates the flow by directing the resource owner's user-agent to the authorization endpoint.
The client includes its client identifier, requested scope, local state, and a redirection URI to which the
authorization server will send the user-agent back once access is granted (or denied).
2. The authorization server authenticates the resource owner (via the user-agent) and establishes whether
the resource owner grants or denies the client's access request.
3. Assuming the resource owner grants access, the authorization server redirects the user-agent back to the
client using the redirection URI provided earlier (in the request or during client registration). The
redirection URI includes an authorization code and any local state provided by the client earlier.
4. The client requests an access token from the authorization server's token endpoint by including the
authorization code received in the previous step. When making the request, the client authenticates with
the authorization server. The client includes the redirection URI used to obtain the authorization code for
verification.
5. The authorization server authenticates the client, validates the authorization code, and ensures that the
redirection URI received matches the URI used to redirect the client in step (3). If valid, the authorization
server responds back with an access token and, optionally, a refresh token.
Request
• grant_type
REQUIRED. Value MUST be set to "authorization_code".
• code
REQUIRED. The authorization code received from the authorization server.
• redirect_uri
REQUIRED, if the "redirect_uri" parameter was included in the authorization request as
described in Section 4.1.1, and their values MUST be identical.
• client_id
REQUIRED, if the client is not authenticating with the authorization server as described in
Section 3.2.1.
POST /token HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
grant_type=refresh_token
&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA
&client_id=s6BhdRkqt3
&client_secret=7Fjfp0ZBr1KtDRbnfVdmIw
Implicit
3
1
2
2
1
7
5
4
6
Implicit
1. The client initiates the flow by directing the resource owner's user-agent to the authorization endpoint. The client
includes its client identifier, requested scope, local state, and a redirection URI to which the authorization server will
send the user-agent back once access is granted (or denied).
2. The authorization server authenticates the resource owner (via the user-agent) and establishes whether the resource
owner grants or denies the client's access request.
3. Assuming the resource owner grants access, the authorization server redirects the user-agent back to the client using
the redirection URI provided earlier.
4. The redirection URI includes the access token in the URI fragment.The user-agent follows the redirection instructions by
making a request to the web-hosted client resource (which does not include the fragment per [RFC2616]).
5. The user-agent retains the fragment information locally.The web-hosted client resource returns a web page (typically
an HTML document with an embedded script) capable of accessing the full redirection URI including the fragment
retained by the user-agent, and extracting the access token (and other parameters) contained in the fragment.
6. The user-agent executes the script provided by the web-hosted client resource locally, which extracts the access token.
7. The user-agent passes the access token to the client.
Request
• response_type
REQUIRED. Value MUST be set to "token".
• client_id
REQUIRED, if the client is not authenticating with the authorization server as described in Section 3.2.1.
• redirect_uri
OPTIONAL. As described in Section 3.1.2.
• state
RECOMMENDED. An opaque value used by the client to maintain state between the request and
callback.The authorization server includes this value when redirecting the user-agent back to the client.
The parameter SHOULD be used for preventing cross-site request forgery as described in Section 10.12.
GET /authorize?
response_type=token
&client_id=s6BhdRkqt3
&state=xyz
&redirect_uri=https%3A%2F%2Fclient%2Eexample
%2Ecom%2Fcb HTTP/1.1
Host: server.example.com
Resource Owner Password Credential
1. The resource owner provides the client with its username and password.
2. The client requests an access token from the authorization server's token endpoint by
including the credentials received from the resource owner. When making the request,
the client authenticates with the authorization server.
3. The authorization server authenticates the client and validates the resource owner
credentials, and if valid, issues an access token.
2
3
1
Request
• grant_type
REQUIRED. Value MUST be set to "client_credentials".
• client_id
REQUIRED, if the client is not authenticating with the authorization server as described in
Section 3.2.1.
POST /token HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
grant_type=refresh_token
&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA
&client_id=s6BhdRkqt3
&client_secret=7Fjfp0ZBr1KtDRbnfVdmIw
Client Credential
1. The client authenticates with the authorization server and requests an
access token from the token endpoint.
2. The authorization server authenticates the client, and if valid, issues an
access token.
1
2
Request
• grant_type
REQUIRED. Value MUST be set to "client_credentials".
• client_id
REQUIRED, if the client is not authenticating with the authorization server as described in
Section 3.2.1.
POST /token HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
grant_type=refresh_token
&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA
&client_id=s6BhdRkqt3
&client_secret=7Fjfp0ZBr1KtDRbnfVdmIw
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
"access_token":"2YotnFZFEjr1zCsicMWpAA",
"token_type":"example",
"expires_in":3600,
"example_parameter":"example_value"
}
RefreshToken
POST /token HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
grant_type=refresh_token
&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA
&client_id=s6BhdRkqt3
&client_secret=7Fjfp0ZBr1KtDRbnfVdmIw
Scope
The authorization and token endpoints allow the client to specify the scope
of the access request using the "scope" request parameter. In turn, the
authorization server uses the "scope" response parameter to inform the client
of the scope of the access token issued. The value of the scope parameter is
expressed as a list of space- delimited, case-sensitive strings.
The strings are defined by the authorization server. If the value contains
multiple space-delimited strings, their order does not matter, and each string
adds an additional access range to the requested scope.
1 de 25

Recomendados

(4) OAuth 2.0 Obtaining Authorization por
(4) OAuth 2.0 Obtaining Authorization(4) OAuth 2.0 Obtaining Authorization
(4) OAuth 2.0 Obtaining Authorizationanikristo
295 vistas33 diapositivas
Microservice security with spring security 5.1,Oauth 2.0 and open id connect por
Microservice security with spring security 5.1,Oauth 2.0 and open id connect Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect Nilanjan Roy
75 vistas61 diapositivas
Learn with WSO2 - API Security por
Learn with WSO2 - API Security Learn with WSO2 - API Security
Learn with WSO2 - API Security WSO2
1.4K vistas59 diapositivas
Protecting your APIs with OAuth 2.0 por
Protecting your APIs with OAuth 2.0Protecting your APIs with OAuth 2.0
Protecting your APIs with OAuth 2.0Ubisecure
128 vistas14 diapositivas
A Survey on SSO Authentication protocols: Security and Performance por
A Survey on SSO Authentication protocols: Security and PerformanceA Survey on SSO Authentication protocols: Security and Performance
A Survey on SSO Authentication protocols: Security and PerformanceAmin Saqi
524 vistas40 diapositivas
An introduction to OAuth 2 por
An introduction to OAuth 2An introduction to OAuth 2
An introduction to OAuth 2Sanjoy Kumar Roy
733 vistas31 diapositivas

Más contenido relacionado

La actualidad más candente

Kaunas jug presentation por
Kaunas jug presentationKaunas jug presentation
Kaunas jug presentationAdamsus
203 vistas18 diapositivas
Oauth 2.0 security por
Oauth 2.0 securityOauth 2.0 security
Oauth 2.0 securityvinoth kumar
942 vistas20 diapositivas
Demystifying OAuth 2.0 por
Demystifying OAuth 2.0Demystifying OAuth 2.0
Demystifying OAuth 2.0Karl McGuinness
7.5K vistas57 diapositivas
Introduction to OAuth2.0 por
Introduction to OAuth2.0Introduction to OAuth2.0
Introduction to OAuth2.0Oracle Corporation
3.3K vistas18 diapositivas
OAuth 2.0 por
OAuth 2.0OAuth 2.0
OAuth 2.0Uwe Friedrichsen
4.8K vistas44 diapositivas
OAuth and Open-id por
OAuth and Open-idOAuth and Open-id
OAuth and Open-idParisa Moosavinezhad
177 vistas25 diapositivas

La actualidad más candente(20)

Kaunas jug presentation por Adamsus
Kaunas jug presentationKaunas jug presentation
Kaunas jug presentation
Adamsus203 vistas
Introducing OpenID 1.0 Protocol: Security and Performance por Amin Saqi
Introducing OpenID 1.0 Protocol: Security and PerformanceIntroducing OpenID 1.0 Protocol: Security and Performance
Introducing OpenID 1.0 Protocol: Security and Performance
Amin Saqi232 vistas
Security for oauth 2.0 - @topavankumarj por Pavan Kumar J
Security for oauth 2.0 - @topavankumarjSecurity for oauth 2.0 - @topavankumarj
Security for oauth 2.0 - @topavankumarj
Pavan Kumar J535 vistas
OAuth2 - Introduction por Knoldus Inc.
OAuth2 - IntroductionOAuth2 - Introduction
OAuth2 - Introduction
Knoldus Inc.6.3K vistas
TLDR - OAuth por Andy March
TLDR - OAuthTLDR - OAuth
TLDR - OAuth
Andy March160 vistas
Spring security oauth2 por axykim00
Spring security oauth2Spring security oauth2
Spring security oauth2
axykim00342 vistas
OAuth [noddyCha] por noddycha
OAuth [noddyCha]OAuth [noddyCha]
OAuth [noddyCha]
noddycha980 vistas
An Introduction to OAuth2 por Aaron Parecki
An Introduction to OAuth2An Introduction to OAuth2
An Introduction to OAuth2
Aaron Parecki14.7K vistas

Destacado

OAuth 2.0 Web Messaging Response Mode - OpenID Summit Tokyo 2015 por
OAuth 2.0 Web Messaging Response Mode - OpenID Summit Tokyo 2015OAuth 2.0 Web Messaging Response Mode - OpenID Summit Tokyo 2015
OAuth 2.0 Web Messaging Response Mode - OpenID Summit Tokyo 2015Toru Yamaguchi
4.8K vistas35 diapositivas
PCI DSS, ISO 27001/27002 , ITIL, VISA и MasterCard. Тесты на проникновение. por
PCI DSS, ISO 27001/27002 , ITIL, VISA и MasterCard. Тесты на проникновение.PCI DSS, ISO 27001/27002 , ITIL, VISA и MasterCard. Тесты на проникновение.
PCI DSS, ISO 27001/27002 , ITIL, VISA и MasterCard. Тесты на проникновение.DjLucefer
546 vistas24 diapositivas
Samuele Cozzi - Curriculum Vitae 2015 por
Samuele Cozzi - Curriculum Vitae 2015Samuele Cozzi - Curriculum Vitae 2015
Samuele Cozzi - Curriculum Vitae 2015Samuele Cozzi
579 vistas11 diapositivas
Обзор протокола OAuth 2.0. Способы внедрения в различные типы приложений por
Обзор протокола OAuth 2.0. Способы внедрения в различные типы приложенийОбзор протокола OAuth 2.0. Способы внедрения в различные типы приложений
Обзор протокола OAuth 2.0. Способы внедрения в различные типы приложенийVitebsk Miniq
2.1K vistas14 diapositivas
ID連携入門 (実習編) - Security Camp 2016 por
ID連携入門 (実習編) - Security Camp 2016ID連携入門 (実習編) - Security Camp 2016
ID連携入門 (実習編) - Security Camp 2016Nov Matake
1.7K vistas73 diapositivas
OAuth 2.0の概要とセキュリティ por
OAuth 2.0の概要とセキュリティOAuth 2.0の概要とセキュリティ
OAuth 2.0の概要とセキュリティHiroshi Hayakawa
18.8K vistas35 diapositivas

Destacado(8)

OAuth 2.0 Web Messaging Response Mode - OpenID Summit Tokyo 2015 por Toru Yamaguchi
OAuth 2.0 Web Messaging Response Mode - OpenID Summit Tokyo 2015OAuth 2.0 Web Messaging Response Mode - OpenID Summit Tokyo 2015
OAuth 2.0 Web Messaging Response Mode - OpenID Summit Tokyo 2015
Toru Yamaguchi4.8K vistas
PCI DSS, ISO 27001/27002 , ITIL, VISA и MasterCard. Тесты на проникновение. por DjLucefer
PCI DSS, ISO 27001/27002 , ITIL, VISA и MasterCard. Тесты на проникновение.PCI DSS, ISO 27001/27002 , ITIL, VISA и MasterCard. Тесты на проникновение.
PCI DSS, ISO 27001/27002 , ITIL, VISA и MasterCard. Тесты на проникновение.
DjLucefer546 vistas
Samuele Cozzi - Curriculum Vitae 2015 por Samuele Cozzi
Samuele Cozzi - Curriculum Vitae 2015Samuele Cozzi - Curriculum Vitae 2015
Samuele Cozzi - Curriculum Vitae 2015
Samuele Cozzi579 vistas
Обзор протокола OAuth 2.0. Способы внедрения в различные типы приложений por Vitebsk Miniq
Обзор протокола OAuth 2.0. Способы внедрения в различные типы приложенийОбзор протокола OAuth 2.0. Способы внедрения в различные типы приложений
Обзор протокола OAuth 2.0. Способы внедрения в различные типы приложений
Vitebsk Miniq2.1K vistas
ID連携入門 (実習編) - Security Camp 2016 por Nov Matake
ID連携入門 (実習編) - Security Camp 2016ID連携入門 (実習編) - Security Camp 2016
ID連携入門 (実習編) - Security Camp 2016
Nov Matake1.7K vistas
OAuth 2.0の概要とセキュリティ por Hiroshi Hayakawa
OAuth 2.0の概要とセキュリティOAuth 2.0の概要とセキュリティ
OAuth 2.0の概要とセキュリティ
Hiroshi Hayakawa18.8K vistas
LASCON: Three Profiels of OAuth2 for Identity and Access Management por Mike Schwartz
LASCON: Three Profiels of OAuth2 for Identity and Access ManagementLASCON: Three Profiels of OAuth2 for Identity and Access Management
LASCON: Three Profiels of OAuth2 for Identity and Access Management
Mike Schwartz1.1K vistas
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ... por SlideShare
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
SlideShare1.1M vistas

Similar a The OAuth 2.0 Authorization Framework

Best Practices in Building an API Security Ecosystem por
Best Practices in Building an API Security EcosystemBest Practices in Building an API Security Ecosystem
Best Practices in Building an API Security EcosystemPrabath Siriwardena
1.4K vistas73 diapositivas
(3) OAuth 2.0 Protocol Endpoints por
(3) OAuth 2.0 Protocol Endpoints(3) OAuth 2.0 Protocol Endpoints
(3) OAuth 2.0 Protocol Endpointsanikristo
233 vistas9 diapositivas
Securing APIs with OAuth 2.0 por
Securing APIs with OAuth 2.0Securing APIs with OAuth 2.0
Securing APIs with OAuth 2.0Kai Hofstetter
784 vistas58 diapositivas
Oauth2 and OWSM OAuth2 support por
Oauth2 and OWSM OAuth2 supportOauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportGaurav Sharma
4K vistas45 diapositivas
Protecting your APIs with Doorkeeper and OAuth 2.0 por
Protecting your APIs with Doorkeeper and OAuth 2.0Protecting your APIs with Doorkeeper and OAuth 2.0
Protecting your APIs with Doorkeeper and OAuth 2.0Mads Toustrup-Lønne
1.9K vistas35 diapositivas
Deep Dive into OAuth for Connected Apps por
Deep Dive into OAuth for Connected AppsDeep Dive into OAuth for Connected Apps
Deep Dive into OAuth for Connected AppsSalesforce Developers
1.1K vistas24 diapositivas

Similar a The OAuth 2.0 Authorization Framework(20)

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
(3) OAuth 2.0 Protocol Endpoints por anikristo
(3) OAuth 2.0 Protocol Endpoints(3) OAuth 2.0 Protocol Endpoints
(3) OAuth 2.0 Protocol Endpoints
anikristo233 vistas
Securing APIs with OAuth 2.0 por Kai Hofstetter
Securing APIs with OAuth 2.0Securing APIs with OAuth 2.0
Securing APIs with OAuth 2.0
Kai Hofstetter784 vistas
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
Protecting your APIs with Doorkeeper and OAuth 2.0 por Mads Toustrup-Lønne
Protecting your APIs with Doorkeeper and OAuth 2.0Protecting your APIs with Doorkeeper and OAuth 2.0
Protecting your APIs with Doorkeeper and OAuth 2.0
Mads Toustrup-Lønne1.9K vistas
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo... por Good Dog Labs, Inc.
OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...
Good Dog Labs, Inc.2.2K vistas
O Auth 2.0 The Path to Heaven from Hell por WSO2
O Auth 2.0   The Path to Heaven from HellO Auth 2.0   The Path to Heaven from Hell
O Auth 2.0 The Path to Heaven from Hell
WSO21.9K vistas
Rest & RESTful WebServices por Prateek Tandon
Rest & RESTful WebServicesRest & RESTful WebServices
Rest & RESTful WebServices
Prateek Tandon5.8K vistas
(1) OAuth 2.0 Overview por anikristo
(1) OAuth 2.0 Overview(1) OAuth 2.0 Overview
(1) OAuth 2.0 Overview
anikristo560 vistas
Amazon Cognito OAuth 2.0 Grants por Sibtay Abbas
Amazon Cognito OAuth 2.0 GrantsAmazon Cognito OAuth 2.0 Grants
Amazon Cognito OAuth 2.0 Grants
Sibtay Abbas13 vistas
Stateless Auth using OAUTH2 & JWT por Mobiliya
Stateless Auth using OAUTH2 & JWTStateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWT
Mobiliya1K 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
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
(6) OAuth 2.0 Refreshing an Access Token por anikristo
(6) OAuth 2.0 Refreshing an Access Token(6) OAuth 2.0 Refreshing an Access Token
(6) OAuth 2.0 Refreshing an Access Token
anikristo232 vistas
Silicon Valley Code Camp 2009: OAuth: What, Why and How por Manish Pandit
Silicon Valley Code Camp 2009: OAuth: What, Why and HowSilicon Valley Code Camp 2009: OAuth: What, Why and How
Silicon Valley Code Camp 2009: OAuth: What, Why and How
Manish Pandit981 vistas

Último

fakenews_DBDA_Mar23.pptx por
fakenews_DBDA_Mar23.pptxfakenews_DBDA_Mar23.pptx
fakenews_DBDA_Mar23.pptxdeepmitra8
16 vistas34 diapositivas
SUMIT SQL PROJECT SUPERSTORE 1.pptx por
SUMIT SQL PROJECT SUPERSTORE 1.pptxSUMIT SQL PROJECT SUPERSTORE 1.pptx
SUMIT SQL PROJECT SUPERSTORE 1.pptxSumit Jadhav
18 vistas26 diapositivas
Ansari: Practical experiences with an LLM-based Islamic Assistant por
Ansari: Practical experiences with an LLM-based Islamic AssistantAnsari: Practical experiences with an LLM-based Islamic Assistant
Ansari: Practical experiences with an LLM-based Islamic AssistantM Waleed Kadous
5 vistas29 diapositivas
Effect of deep chemical mixing columns on properties of surrounding soft clay... por
Effect of deep chemical mixing columns on properties of surrounding soft clay...Effect of deep chemical mixing columns on properties of surrounding soft clay...
Effect of deep chemical mixing columns on properties of surrounding soft clay...AltinKaradagli
10 vistas10 diapositivas
Codes and Conventions.pptx por
Codes and Conventions.pptxCodes and Conventions.pptx
Codes and Conventions.pptxIsabellaGraceAnkers
13 vistas5 diapositivas
Design of machine elements-UNIT 3.pptx por
Design of machine elements-UNIT 3.pptxDesign of machine elements-UNIT 3.pptx
Design of machine elements-UNIT 3.pptxgopinathcreddy
33 vistas31 diapositivas

Último(20)

fakenews_DBDA_Mar23.pptx por deepmitra8
fakenews_DBDA_Mar23.pptxfakenews_DBDA_Mar23.pptx
fakenews_DBDA_Mar23.pptx
deepmitra816 vistas
SUMIT SQL PROJECT SUPERSTORE 1.pptx por Sumit Jadhav
SUMIT SQL PROJECT SUPERSTORE 1.pptxSUMIT SQL PROJECT SUPERSTORE 1.pptx
SUMIT SQL PROJECT SUPERSTORE 1.pptx
Sumit Jadhav 18 vistas
Ansari: Practical experiences with an LLM-based Islamic Assistant por M Waleed Kadous
Ansari: Practical experiences with an LLM-based Islamic AssistantAnsari: Practical experiences with an LLM-based Islamic Assistant
Ansari: Practical experiences with an LLM-based Islamic Assistant
M Waleed Kadous5 vistas
Effect of deep chemical mixing columns on properties of surrounding soft clay... por AltinKaradagli
Effect of deep chemical mixing columns on properties of surrounding soft clay...Effect of deep chemical mixing columns on properties of surrounding soft clay...
Effect of deep chemical mixing columns on properties of surrounding soft clay...
AltinKaradagli10 vistas
Design of machine elements-UNIT 3.pptx por gopinathcreddy
Design of machine elements-UNIT 3.pptxDesign of machine elements-UNIT 3.pptx
Design of machine elements-UNIT 3.pptx
gopinathcreddy33 vistas
MongoDB.pdf por ArthyR3
MongoDB.pdfMongoDB.pdf
MongoDB.pdf
ArthyR345 vistas
_MAKRIADI-FOTEINI_diploma thesis.pptx por fotinimakriadi
_MAKRIADI-FOTEINI_diploma thesis.pptx_MAKRIADI-FOTEINI_diploma thesis.pptx
_MAKRIADI-FOTEINI_diploma thesis.pptx
fotinimakriadi8 vistas
SPICE PARK DEC2023 (6,625 SPICE Models) por Tsuyoshi Horigome
SPICE PARK DEC2023 (6,625 SPICE Models) SPICE PARK DEC2023 (6,625 SPICE Models)
SPICE PARK DEC2023 (6,625 SPICE Models)
Tsuyoshi Horigome33 vistas
Update 42 models(Diode/General ) in SPICE PARK(DEC2023) por Tsuyoshi Horigome
Update 42 models(Diode/General ) in SPICE PARK(DEC2023)Update 42 models(Diode/General ) in SPICE PARK(DEC2023)
Update 42 models(Diode/General ) in SPICE PARK(DEC2023)
Tsuyoshi Horigome38 vistas
GDSC Mikroskil Members Onboarding 2023.pdf por gdscmikroskil
GDSC Mikroskil Members Onboarding 2023.pdfGDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdf
gdscmikroskil58 vistas
Design_Discover_Develop_Campaign.pptx por ShivanshSeth6
Design_Discover_Develop_Campaign.pptxDesign_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptx
ShivanshSeth637 vistas
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for Growth por Innomantra
BCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for GrowthBCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for Growth
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for Growth
Innomantra 6 vistas
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx por lwang78
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx
lwang78109 vistas
REACTJS.pdf por ArthyR3
REACTJS.pdfREACTJS.pdf
REACTJS.pdf
ArthyR334 vistas

The OAuth 2.0 Authorization Framework

  • 1. Introduction to OAuth 2.0 RFC 6749 - Simplified
  • 2. RFC 6749 -The OAuth 2.0 Authorization Framework
  • 4. Resource Owner An entity capable of granting access to a protected resource. When the resource owner is a person, it is referred to as an end-user
  • 5. Resource Server The server hosting the protected resources, capable of accepting and responding to protected resource requests using access tokens
  • 6. Authorization Server The server issuing access tokens to the client after successfully authenticating the resource owner and obtaining authorization.
  • 7. Client An application making protected resource requests on behalf of the resource owner and with its authorization. The term "client" does not imply any particular implementation characteristics (e.g., whether the application executes on a server, a desktop, or other devices).
  • 8. ClientTypes Confidential Clients capable of maintaining the confidentiality of their credentials (e.g., client implemented on a secure server with restricted access to the client credentials), or capable of secure client authentication using other means. Web Application User-Agent-Based Application Public Clients incapable of maintaining the confidentiality of their credentials (e.g., clients executing on the device used by the resource owner, such as an installed native application or a web browser-based application), and incapable of secure client authentication via any other means. Native Apllication
  • 9. Protocol Flow Authorization Grant Authorization Request Access Token Authorization Grant Protected Reource AccessToken
  • 10. Protocol Endpoints The authorization endpoint is used to interact with the resource owner and obtain an authorization grant. Authorization The token endpoint is used by the client to obtain an access token by presenting its authorization grant or refresh token. Token
  • 11. Authorization Endpoint The authorization endpoint is used to interact with the resource owner and obtain an authorization grant. The authorization server MUST first verify the identity of the resource owner. the authorization server MAY support including the client credentials in the request- body using the following parameters: • client_id REQUIRED. The client identifier issued to the client during the registration process described by Section 2.2. • client_secret REQUIRED. The client secret. The client MAY omit the parameter if the client secret is an empty string. POST /token HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded grant_type=refresh_token &refresh_token=tGzv3JOkF0XG5Qx2TlKWIA &client_id=s6BhdRkqt3 &client_secret=7Fjfp0ZBr1KtDRbnfVdmIw
  • 14. Authorization Code 1. The client initiates the flow by directing the resource owner's user-agent to the authorization endpoint. The client includes its client identifier, requested scope, local state, and a redirection URI to which the authorization server will send the user-agent back once access is granted (or denied). 2. The authorization server authenticates the resource owner (via the user-agent) and establishes whether the resource owner grants or denies the client's access request. 3. Assuming the resource owner grants access, the authorization server redirects the user-agent back to the client using the redirection URI provided earlier (in the request or during client registration). The redirection URI includes an authorization code and any local state provided by the client earlier. 4. The client requests an access token from the authorization server's token endpoint by including the authorization code received in the previous step. When making the request, the client authenticates with the authorization server. The client includes the redirection URI used to obtain the authorization code for verification. 5. The authorization server authenticates the client, validates the authorization code, and ensures that the redirection URI received matches the URI used to redirect the client in step (3). If valid, the authorization server responds back with an access token and, optionally, a refresh token.
  • 15. Request • grant_type REQUIRED. Value MUST be set to "authorization_code". • code REQUIRED. The authorization code received from the authorization server. • redirect_uri REQUIRED, if the "redirect_uri" parameter was included in the authorization request as described in Section 4.1.1, and their values MUST be identical. • client_id REQUIRED, if the client is not authenticating with the authorization server as described in Section 3.2.1. POST /token HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded grant_type=refresh_token &refresh_token=tGzv3JOkF0XG5Qx2TlKWIA &client_id=s6BhdRkqt3 &client_secret=7Fjfp0ZBr1KtDRbnfVdmIw
  • 17. Implicit 1. The client initiates the flow by directing the resource owner's user-agent to the authorization endpoint. The client includes its client identifier, requested scope, local state, and a redirection URI to which the authorization server will send the user-agent back once access is granted (or denied). 2. The authorization server authenticates the resource owner (via the user-agent) and establishes whether the resource owner grants or denies the client's access request. 3. Assuming the resource owner grants access, the authorization server redirects the user-agent back to the client using the redirection URI provided earlier. 4. The redirection URI includes the access token in the URI fragment.The user-agent follows the redirection instructions by making a request to the web-hosted client resource (which does not include the fragment per [RFC2616]). 5. The user-agent retains the fragment information locally.The web-hosted client resource returns a web page (typically an HTML document with an embedded script) capable of accessing the full redirection URI including the fragment retained by the user-agent, and extracting the access token (and other parameters) contained in the fragment. 6. The user-agent executes the script provided by the web-hosted client resource locally, which extracts the access token. 7. The user-agent passes the access token to the client.
  • 18. Request • response_type REQUIRED. Value MUST be set to "token". • client_id REQUIRED, if the client is not authenticating with the authorization server as described in Section 3.2.1. • redirect_uri OPTIONAL. As described in Section 3.1.2. • state RECOMMENDED. An opaque value used by the client to maintain state between the request and callback.The authorization server includes this value when redirecting the user-agent back to the client. The parameter SHOULD be used for preventing cross-site request forgery as described in Section 10.12. GET /authorize? response_type=token &client_id=s6BhdRkqt3 &state=xyz &redirect_uri=https%3A%2F%2Fclient%2Eexample %2Ecom%2Fcb HTTP/1.1 Host: server.example.com
  • 19. Resource Owner Password Credential 1. The resource owner provides the client with its username and password. 2. The client requests an access token from the authorization server's token endpoint by including the credentials received from the resource owner. When making the request, the client authenticates with the authorization server. 3. The authorization server authenticates the client and validates the resource owner credentials, and if valid, issues an access token. 2 3 1
  • 20. Request • grant_type REQUIRED. Value MUST be set to "client_credentials". • client_id REQUIRED, if the client is not authenticating with the authorization server as described in Section 3.2.1. POST /token HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded grant_type=refresh_token &refresh_token=tGzv3JOkF0XG5Qx2TlKWIA &client_id=s6BhdRkqt3 &client_secret=7Fjfp0ZBr1KtDRbnfVdmIw
  • 21. Client Credential 1. The client authenticates with the authorization server and requests an access token from the token endpoint. 2. The authorization server authenticates the client, and if valid, issues an access token. 1 2
  • 22. Request • grant_type REQUIRED. Value MUST be set to "client_credentials". • client_id REQUIRED, if the client is not authenticating with the authorization server as described in Section 3.2.1. POST /token HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded grant_type=refresh_token &refresh_token=tGzv3JOkF0XG5Qx2TlKWIA &client_id=s6BhdRkqt3 &client_secret=7Fjfp0ZBr1KtDRbnfVdmIw
  • 23. Response HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 Cache-Control: no-store Pragma: no-cache { "access_token":"2YotnFZFEjr1zCsicMWpAA", "token_type":"example", "expires_in":3600, "example_parameter":"example_value" }
  • 24. RefreshToken POST /token HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded grant_type=refresh_token &refresh_token=tGzv3JOkF0XG5Qx2TlKWIA &client_id=s6BhdRkqt3 &client_secret=7Fjfp0ZBr1KtDRbnfVdmIw
  • 25. Scope The authorization and token endpoints allow the client to specify the scope of the access request using the "scope" request parameter. In turn, the authorization server uses the "scope" response parameter to inform the client of the scope of the access token issued. The value of the scope parameter is expressed as a list of space- delimited, case-sensitive strings. The strings are defined by the authorization server. If the value contains multiple space-delimited strings, their order does not matter, and each string adds an additional access range to the requested scope.