> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# OAuth Authorization Codes Koleksiyonu

`oauthAuthorizationCodes`, OAuth authorization code akışının kodları için düşünülmüştür: her kod için bir belge; istemci bu kodu bir erişim tokeniyle değiştirir. Şema `services/web/app/src/models/OauthAuthorizationCode.mjs` dosyasındadır ve buraya yazacak kod `oauth2-server` web modülündedir. Ayakaleaf Pro'da hiçbir şey bu koda ulaşmaz, bu yüzden koleksiyon boş kalır (Notlar'a bakın).

#### Alanlar

| Alan | Tür | Anlam | Kaynak |
| - | - | - | - |
| `_id` | ObjectId | Belge id'si. | `OauthAuthorizationCode.mjs:6` |
| `authorizationCode` | String | Kodun kendisi; olduğu gibi saklanır (hash'lenmez). | `OauthAuthorizationCode.mjs:8`, `services/web/modules/oauth2-server/app/src/OAuth2Model.mjs:280` |
| `expiresAt` | Date | Geçerliliğin sonu. Bundan sonra `getAuthorizationCode` kodu reddeder ve TTL indeksi onu siler. | `OauthAuthorizationCode.mjs:9`, `OAuth2Model.mjs:150-153,281` |
| `oauthApplication_id` | ObjectId | Kodu isteyen, [OAuth Applications](https://ayakaleaf-pro.mintlify.site/tr/dev/data-model/oauth-applications-collection.md) içindeki istemci. | `OauthAuthorizationCode.mjs:10`, `OAuth2Model.mjs:275-284` |
| `redirectUri` | String | İsteğin yönlendirme URI'si. | `OauthAuthorizationCode.mjs:11`, `OAuth2Model.mjs:282` |
| `scope` | String | İstenen scope. | `OauthAuthorizationCode.mjs:12`, `OAuth2Model.mjs:283` |
| `user_id` | ObjectId | Kodu veren kullanıcı. | `OauthAuthorizationCode.mjs:13`, `OAuth2Model.mjs:285` |
| `codeChallenge`, `codeChallengeMethod` | String | PKCE challenge ve yöntemi. | `OauthAuthorizationCode.mjs:14-15`, `OAuth2Model.mjs:286-287` |

#### Kim yazar

| Kod | Ne yapar |
| - | - |
| `OAuth2Model.mjs:274-300` (`saveAuthorizationCode`) | Bir kod ekler. Hiç çalışmaz, Notlar'a bakın. |
| `OAuth2Model.mjs:307-312` (`revokeAuthorizationCode`) | Kullanılan bir kodu siler. Hiç çalışmaz. |

#### Kim okur

| Kod | Ne yapar |
| - | - |
| `OAuth2Model.mjs:137-177` (`getAuthorizationCode`) | Bir kodu kullanıcısı ve istemcisiyle birlikte yükler. Hiç çalışmaz. |

#### İndeksler

| Ad | Anahtarlar | Seçenekler | Migration |
| - | - | - | - |
| `expiresAt_1` | `{ expiresAt: 1 }` | TTL, `expireAfterSeconds: 0`, kısmi: `expiresAt` mevcut | `20230406125632_oauth_tokens_ttl.mjs` |

Migration'lar `tools/migrations/` içindedir. Benzersiz `authorizationCode_1` indeksi yalnızca `saas` ve `server-pro` etiketli migration'lardan gelir; Community Edition bunları çalıştırmaz.

#### Notlar

* Yukarıdaki model metotlarını yalnızca `@node-oauth/oauth2-server` kütüphanesinin authorize ve token işleyicileri çağırır. Web bu kütüphaneyi yalnızca bearer tokenleri denetlemek için kullanır (`services/web/app/src/Features/Authentication/AuthenticationController.mjs:409-450`) ve `/oauth/authorize` veya `/oauth/token` sunan bir route yoktur, bu yüzden hiçbir zaman kod yazılmaz. Kişisel erişim tokenleri doğrudan oluşturulur, bkz. [OAuth Access Tokens](https://ayakaleaf-pro.mintlify.site/tr/dev/data-model/oauth-access-tokens-collection.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.