SlideShare a Scribd company logo
1 of 9
twitter: @MithunShanbhag
blog: mithunshanbhag.github.io
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
OpenID Connect (OIDC) vs OAuth 2.0
OpenID Connection (OIDC)
• Authentication protocol (SSO)
• Built on OAuth 2.0
• Generates id_token
• Standardizedscopes
OAuth 2.0
• Authorization protocol
• Generates access_token
• Claimsandcustom claims
image attribution: okta dev blog
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
User Client App Authorization Server Resource (API)
Authorization request
Login button
302/Redirectto authentication prompt
Authentication and consent
Calls /authorize endpoint
• client_id: xxxxxxxxxxxx
• redirect_uri: xxxxxxxxxxxxxxx
• state:xxxxxxxxxxxxxxx
• response_type:tokenid_token
• scope: openid
Authorization grant
Requestresource(s)
• access_token
• id_token
• access_token
Response
Implicit Flow
LEGEND
FrontChannel
Back Channel
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
DEMO
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
AppType Channels User
Interaction
Client
Secret
response_type field Recommended Flow
Single Page Apps Front Yes No “token id_token” Implicit
Server-Side Web Apps Front, Back Yes Yes “code” Authorization Code
Native Apps Front, Back Yes Yes “code” Authorization Code/PKCE
CLI,daemons, services Back No Yes N/A Client Credentials
Legacy Apps Front, Back No No N/A Resource Owner/Password
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
User Client App Authorization Server Resource (API)
Authorization request
Login button
302/Redirectto authentication prompt
Authentication and consent
Calls /authorize endpoint
• client_id: {xxxxxxxxxxxx}
• redirect_uri: {xxxxxxxxxxxxxx}
• state:{xxxxxxxxxxxxxxx}
• response_type:code
• scope: openid
Authorization code grant
RequestID and Access tokens
code: {code}
Response
Authorization
Code Flow LEGEND
FrontChannel
Back Channel
Calls /token endpoint
• client_id: xxxxxxxxxxxx
• client_secret: xxxxxxxxxxxxxxx
• code: {code}
• id_token
• access_token
Requestresource(s)
Response
• access_token
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
OIDC Endpoints
• GET/authorize: Obtain user consent andauthorization grant.
• POST/token: Obtains id_token, access_token by supplying the authorization code or refresh_token.
• GET/userinfo: Obtains claims about the authenticated end user.
• POST/revoke: Revoke an access_token or refresh_token.
• GET/logout: Self-explanatory.
• GET/.well-known/keys: Obtain public keys (JWKS) used tosign the tokens.
• GET/.well-known/openid-configuration: Return OIDCmetadata related tothe specified authorization server.
• GET/.well-known/authorization-server: Return OAuth 2.0 metadata related tothe specified authorization server.
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
JWT Structure
HEADER
• Signing algorithm (mostly RS256/asymmetric orHS256/symmetric).
• Signing Key Id.
PAYLOAD
• Standardandcustom claims.
SIGNATURE
• HS256/symmetric:
• The client secret is used toboth sign & verify.
• Signature = HS256(base64UrlEncode(header)+ "." + base64UrlEncode(payload) + “.”+ secret)
• RS256/asymmetric:
• The private signing key/certificate is used tosign.
• Verification done via the public key (JWKS from/.well-known/keys OIDCendpoint).
• Signature = RS256(base64UrlEncode(header)+ "." + base64UrlEncode(payload) + “.”+ public/private key pair)
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
Q&A

More Related Content

Similar to Identity, authentication and authorization

アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -
アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -
アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -Naoki Nagazumi
 
What the Heck is OAuth and OIDC - UberConf 2018
What the Heck is OAuth and OIDC - UberConf 2018What the Heck is OAuth and OIDC - UberConf 2018
What the Heck is OAuth and OIDC - UberConf 2018Matt Raible
 
RFC6749 et alia 20130504
RFC6749 et alia 20130504RFC6749 et alia 20130504
RFC6749 et alia 20130504Mattias Jidhage
 
What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020
What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020
What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020Matt Raible
 
Secure your app with keycloak
Secure your app with keycloakSecure your app with keycloak
Secure your app with keycloakGuy Marom
 
Securing APIs with OAuth 2.0
Securing APIs with OAuth 2.0Securing APIs with OAuth 2.0
Securing APIs with OAuth 2.0Kai Hofstetter
 
Mobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patternsMobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patternsPieter Ennes
 
OAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring BootOAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring BootGeert Pante
 
Intro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectIntro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectLiamWadman
 
Ember Authentication and Authorization with Torii
Ember Authentication and Authorization with ToriiEmber Authentication and Authorization with Torii
Ember Authentication and Authorization with ToriiCory Forsyth
 
OAuth 2.0 Misconceptions
OAuth 2.0 MisconceptionsOAuth 2.0 Misconceptions
OAuth 2.0 MisconceptionsCory Forsyth
 
FamilySearch Authentication Options
FamilySearch Authentication OptionsFamilySearch Authentication Options
FamilySearch Authentication OptionsJimmy Zimmerman
 
Keycloak for Science Gateways - SGCI Technology Sampler Webinar
Keycloak for Science Gateways - SGCI Technology Sampler WebinarKeycloak for Science Gateways - SGCI Technology Sampler Webinar
Keycloak for Science Gateways - SGCI Technology Sampler Webinarmarcuschristie
 
Best Practices in Building an API Security Ecosystem
Best Practices in Building an API Security EcosystemBest Practices in Building an API Security Ecosystem
Best Practices in Building an API Security EcosystemPrabath Siriwardena
 
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...Vladimir Bychkov
 
Adding Identity Management and Access Control to your App
Adding Identity Management and Access Control to your AppAdding Identity Management and Access Control to your App
Adding Identity Management and Access Control to your AppFIWARE
 

Similar to Identity, authentication and authorization (20)

Demystifying OAuth 2.0
Demystifying OAuth 2.0Demystifying OAuth 2.0
Demystifying OAuth 2.0
 
アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -
アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -
アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -
 
What the Heck is OAuth and OIDC - UberConf 2018
What the Heck is OAuth and OIDC - UberConf 2018What the Heck is OAuth and OIDC - UberConf 2018
What the Heck is OAuth and OIDC - UberConf 2018
 
RFC6749 et alia 20130504
RFC6749 et alia 20130504RFC6749 et alia 20130504
RFC6749 et alia 20130504
 
What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020
What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020
What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020
 
Secure your app with keycloak
Secure your app with keycloakSecure your app with keycloak
Secure your app with keycloak
 
OAuth: Trust Issues
OAuth: Trust IssuesOAuth: Trust Issues
OAuth: Trust Issues
 
Securing APIs with OAuth 2.0
Securing APIs with OAuth 2.0Securing APIs with OAuth 2.0
Securing APIs with OAuth 2.0
 
Mobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patternsMobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patterns
 
Api security
Api security Api security
Api security
 
OAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring BootOAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring Boot
 
Intro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectIntro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID Connect
 
TLDR - OAuth
TLDR - OAuthTLDR - OAuth
TLDR - OAuth
 
Ember Authentication and Authorization with Torii
Ember Authentication and Authorization with ToriiEmber Authentication and Authorization with Torii
Ember Authentication and Authorization with Torii
 
OAuth 2.0 Misconceptions
OAuth 2.0 MisconceptionsOAuth 2.0 Misconceptions
OAuth 2.0 Misconceptions
 
FamilySearch Authentication Options
FamilySearch Authentication OptionsFamilySearch Authentication Options
FamilySearch Authentication Options
 
Keycloak for Science Gateways - SGCI Technology Sampler Webinar
Keycloak for Science Gateways - SGCI Technology Sampler WebinarKeycloak for Science Gateways - SGCI Technology Sampler Webinar
Keycloak for Science Gateways - SGCI Technology Sampler Webinar
 
Best Practices in Building an API Security Ecosystem
Best Practices in Building an API Security EcosystemBest Practices in Building an API Security Ecosystem
Best Practices in Building an API Security Ecosystem
 
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
 
Adding Identity Management and Access Control to your App
Adding Identity Management and Access Control to your AppAdding Identity Management and Access Control to your App
Adding Identity Management and Access Control to your App
 

More from Mithun Shanbhag

Design Patterns for Data Management and Consistency
Design Patterns for Data Management and ConsistencyDesign Patterns for Data Management and Consistency
Design Patterns for Data Management and ConsistencyMithun Shanbhag
 
WSL - Windows SubSytem For Linux
WSL - Windows SubSytem For LinuxWSL - Windows SubSytem For Linux
WSL - Windows SubSytem For LinuxMithun Shanbhag
 
Creating user-mode debuggers for Windows
Creating user-mode debuggers for WindowsCreating user-mode debuggers for Windows
Creating user-mode debuggers for WindowsMithun Shanbhag
 
Crash course in git and github
Crash course in git and githubCrash course in git and github
Crash course in git and githubMithun Shanbhag
 

More from Mithun Shanbhag (8)

CloudSkew Architecture
CloudSkew ArchitectureCloudSkew Architecture
CloudSkew Architecture
 
Azure Pipelines
Azure PipelinesAzure Pipelines
Azure Pipelines
 
Terraform on Azure
Terraform on AzureTerraform on Azure
Terraform on Azure
 
Design Patterns for Data Management and Consistency
Design Patterns for Data Management and ConsistencyDesign Patterns for Data Management and Consistency
Design Patterns for Data Management and Consistency
 
WSL - Windows SubSytem For Linux
WSL - Windows SubSytem For LinuxWSL - Windows SubSytem For Linux
WSL - Windows SubSytem For Linux
 
Creating user-mode debuggers for Windows
Creating user-mode debuggers for WindowsCreating user-mode debuggers for Windows
Creating user-mode debuggers for Windows
 
Crash course in sql
Crash course in sqlCrash course in sql
Crash course in sql
 
Crash course in git and github
Crash course in git and githubCrash course in git and github
Crash course in git and github
 

Recently uploaded

chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 

Recently uploaded (20)

chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 

Identity, authentication and authorization

  • 2. twitter: @MithunShanbhagblog: mithunshanbhag.github.io OpenID Connect (OIDC) vs OAuth 2.0 OpenID Connection (OIDC) • Authentication protocol (SSO) • Built on OAuth 2.0 • Generates id_token • Standardizedscopes OAuth 2.0 • Authorization protocol • Generates access_token • Claimsandcustom claims image attribution: okta dev blog
  • 3. twitter: @MithunShanbhagblog: mithunshanbhag.github.io User Client App Authorization Server Resource (API) Authorization request Login button 302/Redirectto authentication prompt Authentication and consent Calls /authorize endpoint • client_id: xxxxxxxxxxxx • redirect_uri: xxxxxxxxxxxxxxx • state:xxxxxxxxxxxxxxx • response_type:tokenid_token • scope: openid Authorization grant Requestresource(s) • access_token • id_token • access_token Response Implicit Flow LEGEND FrontChannel Back Channel
  • 5. twitter: @MithunShanbhagblog: mithunshanbhag.github.io AppType Channels User Interaction Client Secret response_type field Recommended Flow Single Page Apps Front Yes No “token id_token” Implicit Server-Side Web Apps Front, Back Yes Yes “code” Authorization Code Native Apps Front, Back Yes Yes “code” Authorization Code/PKCE CLI,daemons, services Back No Yes N/A Client Credentials Legacy Apps Front, Back No No N/A Resource Owner/Password
  • 6. twitter: @MithunShanbhagblog: mithunshanbhag.github.io User Client App Authorization Server Resource (API) Authorization request Login button 302/Redirectto authentication prompt Authentication and consent Calls /authorize endpoint • client_id: {xxxxxxxxxxxx} • redirect_uri: {xxxxxxxxxxxxxx} • state:{xxxxxxxxxxxxxxx} • response_type:code • scope: openid Authorization code grant RequestID and Access tokens code: {code} Response Authorization Code Flow LEGEND FrontChannel Back Channel Calls /token endpoint • client_id: xxxxxxxxxxxx • client_secret: xxxxxxxxxxxxxxx • code: {code} • id_token • access_token Requestresource(s) Response • access_token
  • 7. twitter: @MithunShanbhagblog: mithunshanbhag.github.io OIDC Endpoints • GET/authorize: Obtain user consent andauthorization grant. • POST/token: Obtains id_token, access_token by supplying the authorization code or refresh_token. • GET/userinfo: Obtains claims about the authenticated end user. • POST/revoke: Revoke an access_token or refresh_token. • GET/logout: Self-explanatory. • GET/.well-known/keys: Obtain public keys (JWKS) used tosign the tokens. • GET/.well-known/openid-configuration: Return OIDCmetadata related tothe specified authorization server. • GET/.well-known/authorization-server: Return OAuth 2.0 metadata related tothe specified authorization server.
  • 8. twitter: @MithunShanbhagblog: mithunshanbhag.github.io JWT Structure HEADER • Signing algorithm (mostly RS256/asymmetric orHS256/symmetric). • Signing Key Id. PAYLOAD • Standardandcustom claims. SIGNATURE • HS256/symmetric: • The client secret is used toboth sign & verify. • Signature = HS256(base64UrlEncode(header)+ "." + base64UrlEncode(payload) + “.”+ secret) • RS256/asymmetric: • The private signing key/certificate is used tosign. • Verification done via the public key (JWKS from/.well-known/keys OIDCendpoint). • Signature = RS256(base64UrlEncode(header)+ "." + base64UrlEncode(payload) + “.”+ public/private key pair)

Editor's Notes

  1. angular app (angular app) Fiddler jwt.io
  2. PKCE: Proof key for code exchange Code verifier, code challenge Client Credentials: Directly call the /token endpoint with client id + client secret, get access_token back Resource Owner Password: Directly call the /token endpoint with usernam + password, get access_token back