@月黑风高食肉虎 噗噗虎的技术博客

OAuth2学习笔记

OAuth2定义:

https://tools.ietf.org/html/rfc6749

OAuth2认证流程

Authorization Grant Type

Abstract Protocol Flow

  • Authorization Code (“code”)
  • Implicit (“token”)
  • Resource Owner Password Credentials (“password”)
  • Client Credentials (“client_credentials”)
  • Extension Grants (grant_type=absolute URI)

Authorization Code Grant 流程

https://tools.ietf.org/html/rfc6749#section-4.1

Authorization Code Flow

Implicit Grant 流程

https://tools.ietf.org/html/rfc6749#section-4.2

Implicit Grant Flow

#### Resource Owner Password Credentials Grant 流程

https://tools.ietf.org/html/rfc6749#section-4.3

Resource Owner Password Credentials Flow

#### Client Credentials Grant 流程

https://tools.ietf.org/html/rfc6749#section-4.4

Client Credentials Flow