Zum Inhalt springen
uencoder

OAuth 2.0 Referenz

Referenz für OAuth 2.0 framework: grant Typen, flows, tokens, und scopes.

Grant Types

Authorization Code (with PKCE) is the standard flow for web and mobile apps. Client Credentials is for machine-to-machine (no user). Refresh Token obtains new access tokens. Resource Owner Password Credentials is deprecated (legacy only). Implicit is deprecated (use Authorization Code + PKCE). Device Code is for devices without a browser (TVs, CLI). PKCE (Proof Key for Code Exchange) prevents authorization code interception on mobile/SPAs.

auth code
Standard flow
with PKCE
client creds
Machine-to-machine
no user
PKCE
Code interception prevention
mobile/SPA

Tokens and Scopes

Access tokens authorize API calls; they should be short-lived (minutes). Refresh tokens obtain new access tokens; they are long-lived (days/weeks) and must be stored securely. Scopes limit what a token can do (read, write, admin). Scopes are defined by the authorization server and enforced by resource servers. Token revocation endpoints invalidate compromised tokens. The token introspection endpoint (RFC 7662) validates opaque tokens. Bearer tokens are sent in the Authorization header.

access token
Short-lived
minutes
refresh token
Long-lived
secure storage
scopes
Permission grants
read, write

Verwandte Tools

参考链接