本文へスキップ
Sursa Developers

GET/.well-known/oauth-authorization-server

認可サーバーのメタデータを取得する

get_oauth_server_metadata

OAuth 2.0の認可サーバーのメタデータ(RFC 8414):issuerはインストール環境のメインアドレスで、同意ページはメインアドレスにあり、トークンエンドポイントと失効エンドポイントは、API専用アドレスが設定されている場合はそのアドレスにあります。サポートされているグラントタイプ、PKCEの方式、クライアントの認証方式、スコープを列挙します。1.62.0で追加されました。

認証

認証情報は不要です。

レスポンス

200成功時のレスポンス

レスポンスヘッダー

  • RateLimit-Policy

    適用中の制限。IETFのドラフトdraft-ietf-httpapi-ratelimit-headersの形式で、"<name>";q=<quota>;w=<window in seconds>の項目をカンマで区切って並べます。keyはAPIキーのリクエストレートです(クォータはバースト、ウィンドウはバーストが完全に回復するまでの時間。セッションではuser、認証情報がない場合はip)。minute、day、monthは、UTCの暦の上での1分・1日・1か月ごとの組織のクォータです。

  • RateLimit

    RateLimit-Policyの各制限の残り:"<name>";r=<remaining>;t=<seconds until reset>。

  • X-RateLimit-Limit

    RateLimit-Policyのうち最も厳しい項目(残りのリクエスト数が最も少ない項目)の上限。

  • X-RateLimit-Remaining

    最も厳しい制限での残りのリクエスト数。

  • X-RateLimit-Reset

    最も厳しい制限がリセットされるまでの秒数。

application/json

オブジェクト:OAuthServerMetadata

  • issuerstring必須
  • authorization_endpointstring必須
  • token_endpointstring必須
  • revocation_endpointstring必須
  • response_types_supportedarray of string必須
  • grant_types_supportedarray of string必須
  • code_challenge_methods_supportedarray of string必須
  • token_endpoint_auth_methods_supportedarray of string必須
  • revocation_endpoint_auth_methods_supportedarray of string必須
  • scopes_supportedarray of string必須
  • service_documentationstring

レート制限

レスポンスには、RateLimitヘッダーとRateLimit-Policyヘッダー、以前のX-RateLimit-Limit、X-RateLimit-Remaining、X-RateLimit-Resetが含まれます。429レスポンスにはRetry-After(秒)が含まれます。その時間だけ待ってから再試行してください。

← oauth · APIリファレンス