OAuth2 & OpenID Connect Deep Dive · Ders

Belirteç Değişimi (RFC 8693)

Hizmetlerin hizmet sınırları arasında yetki devri ve kimliğe bürünmeyi desteklemek için bir belirteci başka bir belirteçle değiştirmesini sağlayan OAuth2 Belirteç Değişimi uzantısını öğrenin.

4. ders / 413 adım

Belirteç Değişimi (RFC 8693), CoddyKit'te ücretsiz bir OAuth2 & OpenID Connect Deep Dive dersidir. Bu, 4 dersinin 4. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, OAuth2 & OpenID Connect Deep Dive öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. OAuth2 & OpenID Connect Deep Dive kursu toplamda 4 dersten oluşur.

Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.

What Problem Does It Solve?

In a microservices world, Service A receives a token from a user, then must call Service B on the user's behalf. Forwarding the original token everywhere is risky — it may have the wrong audience or too-broad scopes.

Token Exchange (RFC 8693) lets a service trade an incoming token for a new, narrower or differently-scoped token from the authorization server.

Delegation vs Impersonation

Two distinct patterns:

  • Impersonation — the new token looks like it belongs purely to the user; downstream cannot tell a middle service was involved.
  • Delegation — the new token records both the user and the acting service via an act claim, preserving the chain.

The Grant Type

Token Exchange defines a new grant type sent to the standard token endpoint:

urn:ietf:params:oauth:grant-type:token-exchange

It does not need a browser or user interaction — it is a direct back-channel call.

Key Parameters

The request uses several parameters:

  • subject_token + subject_token_type — the token to exchange.
  • actor_token — optional, identifies the acting party.
  • audience / resource — the target service.
  • scope — requested scopes for the new token.

Token Type URIs

Token types are identified by URIs, for example:

  • urn:ietf:params:oauth:token-type:access_token
  • urn:ietf:params:oauth:token-type:jwt
  • urn:ietf:params:oauth:token-type:id_token

An Exchange Request

Service A exchanges the user's access token for a token scoped to Service B:

POST /token HTTP/1.1
Host: auth.example.com
Content-Type: application/x-www-form-urlencoded

grant_type=urn:ietf:params:oauth:grant-type:token-exchange
&subject_token=eyJhbGciOi...
&subject_token_type=urn:ietf:params:oauth:token-type:access_token
&audience=https://serviceB.example.com
&scope=read:orders

The Exchange Response

The response includes the new token plus an issued_token_type telling the caller what it received.

{
  "access_token": "eyJ0eXAiOi...",
  "issued_token_type": "urn:ietf:params:oauth:token-type:access_token",
  "token_type": "Bearer",
  "expires_in": 600,
  "scope": "read:orders"
}

The act Claim

In delegation mode, the issued JWT contains an act (actor) claim nesting the acting party inside the subject. This lets the resource server audit who acted on whose behalf.

{
  "sub": "user-42",
  "aud": "https://serviceB.example.com",
  "act": { "sub": "service-A" }
}

Downscoping

A powerful use is downscoping: a service holding a broad token exchanges it for one with fewer scopes before passing it downstream. This honors least privilege so a compromised downstream service cannot do more than it needs.

When to Use It

Reach for Token Exchange when:

  • Crossing trust or audience boundaries between services.
  • You need an auditable delegation chain.
  • You want to narrow scopes for downstream calls.

Avoid blindly forwarding the original token across services.

Security Notes

The authorization server must authenticate the requesting client and verify it is permitted to exchange the subject token for the requested audience. Always set a correct aud so tokens cannot be replayed against other services.

Quick Check

Check your grasp of Token Exchange.

Recap

Token Exchange (RFC 8693) trades one token for another via grant type token-exchange.

  • Supports impersonation and delegation (the act claim).
  • Lets services downscope and re-audience tokens for downstream calls.
  • Requires the AS to authenticate the client and validate the target audience.
Başlamak ücretsiz

Yapay zeka eğitmeniyle OAuth2 & OpenID Connect Deep Dive öğren — ücretsiz

Tarayıcında gerçek kod yaz ve çalıştır, 7/24 yapay zeka eğitmeninden anında yardım al; web'de ya da uygulamada kaldığın yerden devam et.

Kurslar
12
Dersler
48

Sıkça Sorulan Sorular

“Belirteç Değişimi (RFC 8693)” dersi ücretsiz mi?

Evet — “Belirteç Değişimi (RFC 8693)” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve OAuth2 & OpenID Connect Deep Dive kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. OAuth2 & OpenID Connect Deep Dive kursu toplamda 4 dersten oluşur.

“Belirteç Değişimi (RFC 8693)” dersinde ne öğreneceğim?

Hizmetlerin hizmet sınırları arasında yetki devri ve kimliğe bürünmeyi desteklemek için bir belirteci başka bir belirteçle değiştirmesini sağlayan OAuth2 Belirteç Değişimi uzantısını öğrenin. OAuth2 & OpenID Connect Deep Dive ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.

OAuth2 & OpenID Connect Deep Dive öğrenmeye başlamak için deneyim gerekli mi?

Önceden deneyim gerekmez. CoddyKit'te OAuth2 & OpenID Connect Deep Dive, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 4. dersidir.

“Belirteç Değişimi (RFC 8693)” dersi ne kadar sürer?

Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.

Bu OAuth2 & OpenID Connect Deep Dive dersinde kod yazıp çalıştırabilir miyim?

Evet. Her OAuth2 & OpenID Connect Deep Dive dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.

Bu kursun tüm dersleri

  1. Genel İstemciler için PKCE
  2. Yenileme Belirteçleri ve Kapsamlar
  3. Kaynak Sahibi Parola Kimlik Bilgileri
  4. Belirteç Değişimi (RFC 8693)
← OAuth2 & OpenID Connect Deep Dive Sayfasına Dön