Scopes & Claims

Atlantic ID'de scope'lar ve bunların döndürdüğü claim'ler.


Scopes

openid (Zorunlu)

OIDC akışını aktive eder. ID token almak için gerekli.

Claims:

  • sub - Kullanıcının unique UUID'si
  • iss - Issuer URL
  • aud - Client ID
  • exp, iat - Timestamp'ler

profile

Kullanıcının temel profil bilgileri.

Claims:

  • name - Tam ad (örn: "Görkem Yılmaz")
  • picture - Avatar URL
  • updated_at - Profil güncelleme zamanı

email

E-posta bilgisi.

Claims:

  • email - E-posta adresi
  • email_verified - Boolean (her zaman true)

phone

Telefon numarası.

Claims:

  • phone_number - E.164 formatında (örn: "+905001234567")

offline_access

Refresh token almak için gerekli.

Effect:

  • Response'da refresh_token döner
  • Kullanıcı offline iken token yenileme imkanı

Scope Kombinasyonları

Minimal (Sadece Login)

``` openid ``` Sadece sub claim'i döner.

Temel Profil

``` openid profile email ``` Ad, email alırsınız.

Tam Profil

``` openid profile email phone ``` Tüm profil bilgileri.

Long-Term Access

``` openid profile email offline_access ``` Refresh token ile 30 gün erişim.


UserInfo Response Örnekleri

openid

```json { "sub": "550e8400-e29b-41d4-a716-446655440000" } ```

openid profile email

```json { "sub": "550e8400-e29b-41d4-a716-446655440000", "name": "Görkem Yılmaz", "email": "gorkem@codeatlantis.com", "email_verified": true, "picture": "https://id.codeatlantis.com/avatar/550e8400.jpg" } ```

openid profile email phone

```json { "sub": "550e8400-e29b-41d4-a716-446655440000", "name": "Görkem Yılmaz", "email": "gorkem@codeatlantis.com", "email_verified": true, "phone_number": "+905001234567", "picture": "https://id.codeatlantis.com/avatar/550e8400.jpg", "updated_at": 1735686000 } ```


Best Practices

  1. Minimum Scope: Sadece ihtiyacınız olanı isteyin
  2. Privacy: Telefon numarasına gerçekten ihtiyacınız var mı?
  3. Consent: Kullanıcı hangi bilgileri paylaştığını bilmeli
  4. Cache: UserInfo response'unu cache'leyebilirsiniz

İlgili: OAuth & OIDC, JWT Tokens