Creating a Sign On with Open id connect

Derek Binkley
Derek BinkleyLead Developer/Analyst at National Conference of Bar Examiners
Create a Sign On with Open ID
Connect
Derek Binkley
@DerekB_WI
★Lead Developer at National Conference of
Bar Examiners
★PHP and Java Developer
★MySQL DBA
★Father of Three
★Home Pizza Chef
★@DerekB_WI
Questions
• Yes! Please ask them.
• During or at the end.
Why?
OpenID Connect is a new standard
Not a lot of documentation
Built upon Oauth 2.0 which is widespread
Sign On across disconnected services
What is a sign on?
• Authentication (who are you?)
• Authorization (what can you do?)
What is OpenID Connect?
A Simple Identity layer on top of OAuth 2.0
Verify Identity
User basic info
REST-like
Many client types
What is OAuth 2?
• A method of allowing authorized access to
web resources without the need for
usernames and passwords.
• More in Ben Ramsey's May 2016 PHP
Architect article.
PHP Libraries
• Bshaffer’s oauth2-server-php library
Traditional MVC Application
Modern Distributed Architecture
Session State/Authentication
• Login maintained by connection between
browser and Identity Provider
OpenID Steps
1. Client prepares an Authentication Request containing the desired
request parameters.
2. Client sends the request to the Authorization Server.
3. Authorization Server Authenticates the End-User.
4. Authorization Server obtains End-User Consent/Authorization.
5. Authorization Server sends the End-User back to the Client with
an Authorization Code.
6. Client requests a response using the Authorization Code at the
Token Endpoint.
7. Client receives a response that contains an ID Token and Access
Token in the response body.
8. Client validates the ID token and retrieves the End-User's Subject
Identifier.
Setting up Your Auth Server
1. Client prepares an Authentication Request
containing the desired request parameters.
• Client id
• Client secret
• Response Type
• Scope
• State
client_id/client_secret
• Specific to your application
• Sets Up Return URL
Response_type
• Code
• Id_token
• Id_token token
• Code id_token
• Code token
• Code id_token token
State
• Unique string saved by your app
• Prevents a forged return call from Identity
Provider.
2. Client sends the request to the Authorization
Server.
• Forward user to Auth Server URL
• Have user post form to Auth Server
3. Authorization Server Authenticates the End-User.
• Implementation entirely up to you.
• What? Isn’t this specification about
authentication?
Authentication Methods
• Something you know
• Something you are
• Something you have
4. Authorization Server obtains End-User
Consent/Authorization.
• My app would like to access … Allow?
• Optional if you are in control of all parts of the
chain.
5. Authorization Server sends the End-User back
to the Client with an Authorization Code.
• Forward to client URL
• Either receive error or code.
• Trade code for token.
Auth Server Code
Creating a Sign On with Open id connect
6. Client requests a response using the
Authorization Code at the Token Endpoint.
• Your PHP app sends an http request back to
the Identity Provider (OpenID server).
• Trades one time use code for token.
Client Code
7. Client receives a response that contains an ID
Token and Access Token in the response body.
• Response back with ID token and access token
• ID Token can be decrypted to ensure integrity
and details of session
Server Code
Client Code
8. Client validates the ID token and retrieves the
End-User's Subject Identifier.
8. Client validates the ID token and retrieves the
End-User's Subject Identifier.
Taking it further with session handling
• Sessions between App and Identity Provider
don’t stay in sync.
• No way for App to check.
Modern Distributed Architecture
Logout Problem
• User logs out of Identity Provider then logins
in as another user then returns to App.
• App still has access token for first login.
• App won’t know immediately that token has
expired so could reveal one user’s data to
another.
Embed an Iframe with Auth Server Connection
• Send message to iframe to get user’s login status.
• Handle response checking for ‘unchanged’
X-Frame-Options not enough
Content Security Policy in Apache Config
• Header set Content-Security-Policy "default-
src * 'unsafe-inline' 'unsafe-eval'; frame-
ancestors 'self' *.example.com"
Thanks
• Feedback at Meetup or Joind.in
• https://joind.in/event/2016-madison-php-meetings
Resources
• https://www.phparch.com/2016/05/may-2016-full-speed-ahead/
• http://openid.net/specs/openid-connect-core-1_0.html
• http://openid.net/specs/openid-connect-session-1_0.html
• http://bshaffer.github.io/oauth2-server-php-docs/cookbook/
• https://www.jwtinspector.io/
1 de 39

Recomendados

Open Id, O Auth And Webservices por
Open Id, O Auth And WebservicesOpen Id, O Auth And Webservices
Open Id, O Auth And WebservicesMyles Eftos
2.2K vistas44 diapositivas
CIS14: OAuth and OpenID Connect in Action por
CIS14: OAuth and OpenID Connect in ActionCIS14: OAuth and OpenID Connect in Action
CIS14: OAuth and OpenID Connect in ActionCloudIDSummit
615 vistas31 diapositivas
OpenID Connect and Single Sign-On for Beginners por
OpenID Connect and Single Sign-On for BeginnersOpenID Connect and Single Sign-On for Beginners
OpenID Connect and Single Sign-On for BeginnersSalesforce Developers
22.7K vistas30 diapositivas
OpenID Connect: The new standard for connecting to your Customers, Partners, ... por
OpenID Connect: The new standard for connecting to your Customers, Partners, ...OpenID Connect: The new standard for connecting to your Customers, Partners, ...
OpenID Connect: The new standard for connecting to your Customers, Partners, ...Salesforce Developers
12.1K vistas41 diapositivas
CIS14: Working with OAuth and OpenID Connect por
CIS14: Working with OAuth and OpenID ConnectCIS14: Working with OAuth and OpenID Connect
CIS14: Working with OAuth and OpenID ConnectCloudIDSummit
3.2K vistas54 diapositivas
OAuth 2.0 and OpenId Connect por
OAuth 2.0 and OpenId ConnectOAuth 2.0 and OpenId Connect
OAuth 2.0 and OpenId ConnectSaran Doraiswamy
3K vistas39 diapositivas

Más contenido relacionado

La actualidad más candente

Enterprise Single Sign On por
Enterprise Single Sign On Enterprise Single Sign On
Enterprise Single Sign On WSO2
4.1K vistas32 diapositivas
O auth2 with angular js por
O auth2 with angular jsO auth2 with angular js
O auth2 with angular jsBixlabs
424 vistas51 diapositivas
Box connector por
Box connectorBox connector
Box connectorThang Loi
104 vistas22 diapositivas
Single Sign On with OAuth and OpenID por
Single Sign On with OAuth and OpenIDSingle Sign On with OAuth and OpenID
Single Sign On with OAuth and OpenIDGasperi Jerome
5.2K vistas23 diapositivas
Stateless Auth using OAUTH2 & JWT por
Stateless Auth using OAUTH2 & JWTStateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWTMobiliya
1K vistas73 diapositivas
OAuth 2 por
OAuth 2OAuth 2
OAuth 2ChrisWood262
365 vistas20 diapositivas

La actualidad más candente(20)

Enterprise Single Sign On por WSO2
Enterprise Single Sign On Enterprise Single Sign On
Enterprise Single Sign On
WSO24.1K 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
Box connector por Thang Loi
Box connectorBox connector
Box connector
Thang Loi104 vistas
Single Sign On with OAuth and OpenID por Gasperi Jerome
Single Sign On with OAuth and OpenIDSingle Sign On with OAuth and OpenID
Single Sign On with OAuth and OpenID
Gasperi Jerome5.2K vistas
Stateless Auth using OAUTH2 & JWT por Mobiliya
Stateless Auth using OAUTH2 & JWTStateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWT
Mobiliya1K vistas
OAuth2 & OpenID Connect por Marcin Wolnik
OAuth2 & OpenID ConnectOAuth2 & OpenID Connect
OAuth2 & OpenID Connect
Marcin Wolnik592 vistas
Linkedin & OAuth por Umang Goyal
Linkedin & OAuthLinkedin & OAuth
Linkedin & OAuth
Umang Goyal5.1K vistas
Web API 2 Token Based Authentication por jeremysbrown
Web API 2 Token Based AuthenticationWeb API 2 Token Based Authentication
Web API 2 Token Based Authentication
jeremysbrown2.6K vistas
CIS 2012 - Going Mobile with PingFederate and OAuth 2 por scotttomilson
CIS 2012 - Going Mobile with PingFederate and OAuth 2CIS 2012 - Going Mobile with PingFederate and OAuth 2
CIS 2012 - Going Mobile with PingFederate and OAuth 2
scotttomilson3.7K vistas
OIDF Workshop at Verizon Media -- 9/30/2019 -- Browser Changes Impacting Iden... por OpenIDFoundation
OIDF Workshop at Verizon Media -- 9/30/2019 -- Browser Changes Impacting Iden...OIDF Workshop at Verizon Media -- 9/30/2019 -- Browser Changes Impacting Iden...
OIDF Workshop at Verizon Media -- 9/30/2019 -- Browser Changes Impacting Iden...
OpenIDFoundation1.6K vistas
Claim based authentaication por Sean Xiong
Claim based authentaicationClaim based authentaication
Claim based authentaication
Sean Xiong462 vistas
OpenID Connect vs. OpenID 1 & 2 por Mike Schwartz
OpenID Connect vs. OpenID 1 & 2OpenID Connect vs. OpenID 1 & 2
OpenID Connect vs. OpenID 1 & 2
Mike Schwartz10.4K 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
LiamWadman145 vistas
Spring security oauth2 por axykim00
Spring security oauth2Spring security oauth2
Spring security oauth2
axykim00344 vistas
Office 365 api vs share point app model por BIWUG
Office 365 api vs share point app modelOffice 365 api vs share point app model
Office 365 api vs share point app model
BIWUG1.5K vistas

Similar a Creating a Sign On with Open id connect

CIS 2015 OpenID Connect and Mobile Applications - David Chase por
CIS 2015 OpenID Connect and Mobile Applications - David ChaseCIS 2015 OpenID Connect and Mobile Applications - David Chase
CIS 2015 OpenID Connect and Mobile Applications - David ChaseCloudIDSummit
363 vistas17 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
476 vistas49 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
Wso2 is integration with .net core por
Wso2 is   integration with .net coreWso2 is   integration with .net core
Wso2 is integration with .net coreIsmaeel Enjreny
550 vistas19 diapositivas
Y U No OAuth, Using Common Patterns to Secure Your Web Applications por
Y U No OAuth, Using Common Patterns to Secure Your Web ApplicationsY U No OAuth, Using Common Patterns to Secure Your Web Applications
Y U No OAuth, Using Common Patterns to Secure Your Web ApplicationsJason Robert
559 vistas57 diapositivas
Clef security architecture por
Clef security architectureClef security architecture
Clef security architecturejessepollak
1.9K vistas30 diapositivas

Similar a Creating a Sign On with Open id connect(20)

CIS 2015 OpenID Connect and Mobile Applications - David Chase por CloudIDSummit
CIS 2015 OpenID Connect and Mobile Applications - David ChaseCIS 2015 OpenID Connect and Mobile Applications - David Chase
CIS 2015 OpenID Connect and Mobile Applications - David Chase
CloudIDSummit363 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
aminmesbahi476 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
Wso2 is integration with .net core por Ismaeel Enjreny
Wso2 is   integration with .net coreWso2 is   integration with .net core
Wso2 is integration with .net core
Ismaeel Enjreny550 vistas
Y U No OAuth, Using Common Patterns to Secure Your Web Applications por Jason Robert
Y U No OAuth, Using Common Patterns to Secure Your Web ApplicationsY U No OAuth, Using Common Patterns to Secure Your Web Applications
Y U No OAuth, Using Common Patterns to Secure Your Web Applications
Jason Robert559 vistas
Clef security architecture por jessepollak
Clef security architectureClef security architecture
Clef security architecture
jessepollak1.9K vistas
Securing SharePoint Apps with OAuth por Kashif Imran
Securing SharePoint Apps with OAuthSecuring SharePoint Apps with OAuth
Securing SharePoint Apps with OAuth
Kashif Imran6.7K vistas
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
Spring4 security oauth2 por Sang Shin
Spring4 security oauth2Spring4 security oauth2
Spring4 security oauth2
Sang Shin281 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
Microservice security with spring security 5.1,Oauth 2.0 and open id connect por Nilanjan Roy
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 Roy75 vistas
InfoSecurity Europe 2015 - Identities Exposed by David Johansson por David Johansson
InfoSecurity Europe 2015 - Identities Exposed by David JohanssonInfoSecurity Europe 2015 - Identities Exposed by David Johansson
InfoSecurity Europe 2015 - Identities Exposed by David Johansson
David Johansson83 vistas
Spring4 security oauth2 por axykim00
Spring4 security oauth2Spring4 security oauth2
Spring4 security oauth2
axykim0075 vistas
Securing .NET Core, ASP.NET Core applications por NETUserGroupBern
Securing .NET Core, ASP.NET Core applicationsSecuring .NET Core, ASP.NET Core applications
Securing .NET Core, ASP.NET Core applications
NETUserGroupBern51 vistas
JDD2015: Security in the era of modern applications and services - Bolesław D... por PROIDEA
JDD2015: Security in the era of modern applications and services - Bolesław D...JDD2015: Security in the era of modern applications and services - Bolesław D...
JDD2015: Security in the era of modern applications and services - Bolesław D...
PROIDEA219 vistas

Último

Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... por
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...ShapeBlue
209 vistas20 diapositivas
Business Analyst Series 2023 - Week 4 Session 7 por
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7DianaGray10
152 vistas31 diapositivas
Initiating and Advancing Your Strategic GIS Governance Strategy por
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance StrategySafe Software
198 vistas68 diapositivas
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... por
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Moses Kemibaro
38 vistas38 diapositivas
AIM102-S_Cognizant_CognizantCognitive por
AIM102-S_Cognizant_CognizantCognitiveAIM102-S_Cognizant_CognizantCognitive
AIM102-S_Cognizant_CognizantCognitivePhilipBasford
23 vistas36 diapositivas
KubeConNA23 Recap.pdf por
KubeConNA23 Recap.pdfKubeConNA23 Recap.pdf
KubeConNA23 Recap.pdfMichaelOLeary82
28 vistas27 diapositivas

Último(20)

Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... por ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue209 vistas
Business Analyst Series 2023 - Week 4 Session 7 por DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10152 vistas
Initiating and Advancing Your Strategic GIS Governance Strategy por Safe Software
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
Safe Software198 vistas
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... por Moses Kemibaro
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Moses Kemibaro38 vistas
AIM102-S_Cognizant_CognizantCognitive por PhilipBasford
AIM102-S_Cognizant_CognizantCognitiveAIM102-S_Cognizant_CognizantCognitive
AIM102-S_Cognizant_CognizantCognitive
PhilipBasford23 vistas
The Power of Generative AI in Accelerating No Code Adoption.pdf por Saeed Al Dhaheri
The Power of Generative AI in Accelerating No Code Adoption.pdfThe Power of Generative AI in Accelerating No Code Adoption.pdf
The Power of Generative AI in Accelerating No Code Adoption.pdf
Saeed Al Dhaheri44 vistas
LLMs in Production: Tooling, Process, and Team Structure por Aggregage
LLMs in Production: Tooling, Process, and Team StructureLLMs in Production: Tooling, Process, and Team Structure
LLMs in Production: Tooling, Process, and Team Structure
Aggregage65 vistas
Bronack Skills - Risk Management and SRE v1.0 12-3-2023.pdf por ThomasBronack
Bronack Skills - Risk Management and SRE v1.0 12-3-2023.pdfBronack Skills - Risk Management and SRE v1.0 12-3-2023.pdf
Bronack Skills - Risk Management and SRE v1.0 12-3-2023.pdf
ThomasBronack31 vistas
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And... por ShapeBlue
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
ShapeBlue120 vistas
Innovation & Entrepreneurship strategies in Dairy Industry por PervaizDar1
Innovation & Entrepreneurship strategies in Dairy IndustryInnovation & Entrepreneurship strategies in Dairy Industry
Innovation & Entrepreneurship strategies in Dairy Industry
PervaizDar139 vistas
The Role of Patterns in the Era of Large Language Models por Yunyao Li
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language Models
Yunyao Li104 vistas
NTGapps NTG LowCode Platform por Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu474 vistas
What is Authentication Active Directory_.pptx por HeenaMehta35
What is Authentication Active Directory_.pptxWhat is Authentication Active Directory_.pptx
What is Authentication Active Directory_.pptx
HeenaMehta3515 vistas
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023 por BookNet Canada
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
BookNet Canada46 vistas
"Node.js vs workers — A comparison of two JavaScript runtimes", James M Snell por Fwdays
"Node.js vs workers — A comparison of two JavaScript runtimes", James M Snell"Node.js vs workers — A comparison of two JavaScript runtimes", James M Snell
"Node.js vs workers — A comparison of two JavaScript runtimes", James M Snell
Fwdays14 vistas
Measurecamp Brussels - Synthetic data.pdf por Human37
Measurecamp Brussels - Synthetic data.pdfMeasurecamp Brussels - Synthetic data.pdf
Measurecamp Brussels - Synthetic data.pdf
Human37 27 vistas
Cocktail of Environments. How to Mix Test and Development Environments and St... por Aleksandr Tarasov
Cocktail of Environments. How to Mix Test and Development Environments and St...Cocktail of Environments. How to Mix Test and Development Environments and St...
Cocktail of Environments. How to Mix Test and Development Environments and St...
Aleksandr Tarasov26 vistas
Future of AR - Facebook Presentation por Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty66 vistas

Creating a Sign On with Open id connect

Notas del editor

  1. Authentication – Username/Password, Login token, two factor Authorization – Once you know who the user is what are they allowed to do?
  2. OpenID Connect 1.0 is a simple identity layer on top of the OAuth 2.0 protocol. It allows Clients to verify the identity of the End-User based on the authentication performed by an Authorization Server, as well as to obtain basic profile information about the End-User in an interoperable and REST-like manner. OpenID Connect allows clients of all types, including Web-based, mobile, and JavaScript clients, to request and receive information about authenticated sessions and end-users. The specification suite is extensible, allowing participants to use optional features such as encryption of identity data, discovery of OpenID Providers, and session management, when it makes sense for them.
  3. Mention access keys plus different grant types.
  4. For this talk we will be working with the Oauth 2.0 Server from Brent from Google.
  5. Straightforward to maintain login and session state. Each MVC app would have own login scheme.
  6. Micro services Node, Ruby, PHP Mobile Apps Where does the authentication go? Using a traditional LDAP/Active Directory it would go in each app. This violates DRY.
  7. Think about this for a minute. The applications still need to know who you are. How can we trust the web browser to tell us? Cookies are modifiable so on their own wouldn’t work. Two sessions can get out of sync, user logs out and another user logs in.
  8. Eight steps, let’s go through each step in detail.
  9. Explain each setup here but more detail to come.
  10. Basically like your apps username and password for the IDP.
  11. Code will use the authorization code flow
  12. Not as simple as it sounds. Browser has to submit. Server must accept get and post.
  13. Yes and No. It doesn’t get into the details of how to determine a user because that can change based on context. After user proves who they are how do you verify across servers?
  14. One or more of these can be used to identify a user. How to do this is a whole nother talk.
  15. Allow such and such app to access my Facebook profile
  16. TODO: insert picture of browser getting sent back to PHP app. Remember the client is the PHP app.
  17. Easy with library but details are obfuscated.
  18. Step through this Log statements added to help you see what is going on.
  19. At this point your PHP application finally has an identifier for who is logged in.
  20. Step through this
  21. Library handles it for you.
  22. Step through this
  23. iss REQUIRED. Issuer Identifier for the Issuer of the response. The iss value is a case sensitive URL using the https scheme that contains scheme, host, and optionally, port number and path components and no query or fragment components. sub REQUIRED. Subject Identifier. A locally unique and never reassigned identifier within the Issuer for the End-User, which is intended to be consumed by the Client, e.g., 24400320 or AItOawmwtWwcT0k51BayewNvutrJUqsvl6qs7A4. It MUST NOT exceed 255 ASCII characters in length. The sub value is a case sensitive string. aud REQUIRED. Audience(s) that this ID Token is intended for. It MUST contain the OAuth 2.0 client_id of the Relying Party as an audience value. It MAY also contain identifiers for other audiences. In the general case, the aud value is an array of case sensitive strings. In the common special case when there is one audience, the aud value MAY be a single case sensitive string. exp REQUIRED. Expiration time on or after which the ID Token MUST NOT be accepted for processing. The processing of this parameter requires that the current date/time MUST be before the expiration date/time listed in the value. Implementers MAY provide for some small leeway, usually no more than a few minutes, to account for clock skew. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time. See RFC 3339 [RFC3339] for details regarding date/times in general and UTC in particular. iat REQUIRED. Time at which the JWT was issued. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time. auth_time Time when the End-User authentication occurred. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time. When a max_age request is made or when auth_time is requested as an Essential Claim, then this Claim is REQUIRED; otherwise, its inclusion is OPTIONAL. (The auth_time Claim semantically corresponds to the OpenID 2.0 PAPE [OpenID.PAPE] auth_time response parameter.) nonce String value used to associate a Client session with an ID Token, and to mitigate replay attacks. The value is passed through unmodified from the Authentication Request to the ID Token. If present in the ID Token, Clients MUST verify that the nonce Claim Value is equal to the value of the nonce parameter sent in the Authentication Request. If present in the Authentication Request, Authorization Servers MUST include a nonce Claim in the ID Token with the Claim Value being the nonce value sent in the Authentication Request. Authorization Servers SHOULD perform no other processing on nonce values used. The nonce value is a case sensitive string. acr OPTIONAL. Authentication Context Class Reference. String specifying an Authentication Context Class Reference value that identifies the Authentication Context Class that the authentication performed satisfied. The value "0" indicates the End-User authentication did not meet the requirements of ISO/IEC 29115 [ISO29115] level 1. Authentication using a long-lived browser cookie, for instance, is one example where the use of "level 0" is appropriate. Authentications with level 0 SHOULD NOT be used to authorize access to any resource of any monetary value. (This corresponds to the OpenID 2.0 PAPE [OpenID.PAPE] nist_auth_level 0.) An absolute URI or an RFC 6711 [RFC6711] registered name SHOULD be used as the acr value; registered names MUST NOT be used with a different meaning than that which is registered. Parties using this claim will need to agree upon the meanings of the values used, which may be context-specific. The acr value is a case sensitive string.
  24. Let’s revisit Session is between laptop and IDP