AM
JA
無料で始める
メニュー

Client

認証およびトークン設定のための OAuth 2.0 クライアントアプリケーション設定。

client クライアント oauth application アプリケーション configuration 設定

Client

Client は、ユーザー認証とトークン要求を行う OAuth 2.0 アプリケーションです。許可オリジン、リダイレクト URI、トークン設定を定義します。

スキーマ

interface Client {
  id: string; // "cid..." - 一意識別子
  resource_id: string; // 所有元の application または account
  issuer: string;
  audience: string | null;
  allowed_origins: string[];
  redirect_uris: string[];
  allowed_scope: string | null;
  default_scope: string | null;
  access_token_config: TokenConfig | null;
  refresh_token_config: TokenConfig | null;
  id_token_config: TokenConfig | null;
}

interface TokenConfig {
  expires_in: number;
  cookie_options?: {
    http_only?: boolean;
    secure?: boolean;
    same_site?: "lax" | "strict" | "none";
  };
}

プロパティ

PropertyTypeDescription
idstringcid プレフィックス付き KSUID
resource_idstringClient を所有する Application または Account
issuerstringトークンの issuer クレーム
audiencestring?トークンの audience クレーム
allowed_originsstring[]有効な CORS オリジン
redirect_urisstring[]OAuth リダイレクト URL
allowed_scopestring?トークン要求で許可されるスコープ
default_scopestring?未指定時に適用されるデフォルトスコープ
access_token_configobject?Access Token 設定
refresh_token_configobject?Refresh Token 設定
id_token_configobject?ID Token 設定

{
  "id": "cid_2kHfPZcN9xW4mE8RtY7vB",
  "resource_id": "app_root",
  "issuer": "https://auth.example.com",
  "audience": "https://api.example.com",
  "allowed_origins": ["https://app.example.com"],
  "redirect_uris": ["https://app.example.com/callback"],
  "access_token_config": {
    "expires_in": 3600
  },
  "refresh_token_config": {
    "expires_in": 1209600
  }
}

関連