IdentityServer4 学习

一、OAuth2.0

OAuth2.0 是一个委托协议,它可以让那些控制资源的人允许某个应用以代表他们来访问他们控制的资源。
这个应用从资源的所有者获得授权(Authorization)和access token,然后使用这个access token 来访问资源
  +--------+                               +---------------+
     |        |--(A)- Authorization Request ->|   Resource    |
     |        |                               |     Owner     |
     |        |<-(B)-- Authorization Grant ---|               |
     |        |                               +---------------+
     |        |
     |        |                               +---------------+
     |        |--(C)-- Authorization Grant -->| Authorization |
     | Client |                               |     Server    |
     |        |<-(D)----- Access Token -------|               |
     |        |                               +---------------+
     |        |
     |        |                               +---------------+
     |        |--(E)----- Access Token ------>|    Resource   |
     |        |                               |     Server    |
     |        |<-(F)--- Protected Resource ---|               |
     +--------+                               +---------------+

授权类型:
Authorization Code :采用授权服务器做中介
implicit: Authorization Code的简化模式
Resource Owner Password Credentials:资源所有者的密码授权,客户端与用户高度信任
Client Credentials:客户端证书授权适用于非用户数据这样的重要资源




OAuth2.0 授权Authorization =》你能干什么;OpenIDConnect 身份认证 Authentication =》你是谁

猜你喜欢

转载自www.cnblogs.com/MrZheng/p/10952723.html