# OpenID OAuth2.0、OpenID Connect和JWT https://zhuanlan.zhihu.com/p/351693888 ### OAuth2: 授權類型 * Authorization Code * Grant Type: Implicit:隐藏式; * 和Authorization Code相比,这种类型跳过了获取Authorization Code的步骤,直接获取令牌 * Grant Type: Resource Owner Password Credentials:密码式; * 这种类型需要用户把密码给client * Grant Type: Client Credential :凭证式。 ### openID: OIDC是在OAuth2.0上做的小幅扩展,那么这个扩展到底是什么呢?在OAuth2.0上的扩展就两点: 在最早的Client向Authorization Server请求这一步中, Client(“约Gemfield吃饭”) 重定向你的浏览器到 Authorization Server (支付宝),这个请求包含了 Client ID、Redirect URI、Response Type以及一个或多个所需的Scopes;在OIDC中使用了scope=openid 在最后的Authorization Server向Client返回access token这一步,Authorization Server(支付宝) 验证Client ID、Client Secret和Authorization Code并向Client(“约Gemfield吃饭”)返回Access Token;在OIDC中,返回Access Token和ID Token openid vs SAML: https://auth0.com/intro-to-iam/saml-vs-openid-connect-oidc/ Make client: google: https://developers.google.com/identity/protocols/oauth2/openid-connect fb: https://developers.facebook.com/docs/facebook-login/overview fd 前端: https://developers.facebook.com/docs/facebook-login/web oidc https://developers.facebook.com/docs/facebook-login/limited-login/token/ Make server