OAuth 2.0 (EN)

Standard

Authorization framework for accessing user data without sharing credentials

OAuth 2.0 Architecture

OAuth 2.0 defines an architecture with four main components:

flowchart LR     A[Client] -->|1. Request| B[Resource Owner]     B -->|2. Consent| C[Authorization Server]     C -->|3. Authorization Code| A     A -->|4. Code for Token| C     C -->|5. Access Token| A     A -->|6. Access| D[Resource Server]     D -->|7. Protected Resource| A 

OAuth 2.0 Flows

  • Authorization Code Flow: For server-side applications, most secure flow
  • Implicit Flow: For client-side applications, direct token receipt
  • Resource Owner Password Credentials Flow: For trusted applications with user password
  • Client Credentials Flow: For machine-to-machine communication

In Context

  • Typically used together with OpenID Connect
  • Related to: SAML, JWT, OpenID Connect
  • Example use case: A third-party app wants to access a user's photos at a photo service
Quelle: AI Generated