SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
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

PPTX
JWT SSO Inbound Authenticator
PPTX
Client certificate validation in windows 8
KEY
OpenID vs OAuth - Identity on the Web
PDF
Les mécanismes et protocoles d’authentification sans mot de passe avec Window...
PPTX
Securing your apps with OAuth2 and OpenID Connect - Roland Guijt - Codemotion...
PPTX
OAuth2 + API Security
PDF
Torii: Ember.js Authentication Library
PPTX
Box connector
JWT SSO Inbound Authenticator
Client certificate validation in windows 8
OpenID vs OAuth - Identity on the Web
Les mécanismes et protocoles d’authentification sans mot de passe avec Window...
Securing your apps with OAuth2 and OpenID Connect - Roland Guijt - Codemotion...
OAuth2 + API Security
Torii: Ember.js Authentication Library
Box connector

Similar to Identity, authentication and authorization (20)

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

More from Mithun Shanbhag (8)

PPTX
CloudSkew Architecture
PPTX
Azure Pipelines
PPTX
Terraform on Azure
PPTX
Design Patterns for Data Management and Consistency
PPTX
WSL - Windows SubSytem For Linux
PPTX
Creating user-mode debuggers for Windows
PPTX
Crash course in sql
PPTX
Crash course in git and github
CloudSkew Architecture
Azure Pipelines
Terraform on Azure
Design Patterns for Data Management and Consistency
WSL - Windows SubSytem For Linux
Creating user-mode debuggers for Windows
Crash course in sql
Crash course in git and github
Ad

Recently uploaded (20)

PDF
AutoCAD Professional Crack 2025 With License Key
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
Website Design Services for Small Businesses.pdf
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PDF
Complete Guide to Website Development in Malaysia for SMEs
PPTX
assetexplorer- product-overview - presentation
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
Odoo Companies in India – Driving Business Transformation.pdf
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PDF
Autodesk AutoCAD Crack Free Download 2025
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
AutoCAD Professional Crack 2025 With License Key
Weekly report ppt - harsh dattuprasad patel.pptx
Oracle Fusion HCM Cloud Demo for Beginners
Website Design Services for Small Businesses.pdf
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
Complete Guide to Website Development in Malaysia for SMEs
assetexplorer- product-overview - presentation
Operating system designcfffgfgggggggvggggggggg
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Odoo Companies in India – Driving Business Transformation.pdf
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
Autodesk AutoCAD Crack Free Download 2025
Advanced SystemCare Ultimate Crack + Portable (2025)
Salesforce Agentforce AI Implementation.pdf
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Monitoring Stack: Grafana, Loki & Promtail
Wondershare Filmora 15 Crack With Activation Key [2025

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

  • #5: angular app (angular app) Fiddler jwt.io
  • #6: 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