OAuth Flowsオブジェクト
サポートされている OAuth フローの構成を許可します。
固定フィールド
| フィールド名 | タイプ | 説明 |
|---|---|---|
| 暗黙 | OAuth フロー オブジェクト | OAuth暗黙的フローの構成 |
| パスワード | OAuth フロー オブジェクト | OAuth リソースオーナーパスワードフローの構成 |
| clientCredentials | OAuth フロー オブジェクト | OAuth クライアント資格情報フローの構成。以前はOpenAPI 2.0 でapplicationと呼び出されていました。 |
| 認証コード | OAuth フロー オブジェクト | OAuth 認証コード フローの構成。以前はOpenAPI 2.0 でaccessCodeと呼び出されていました。 |
このオブジェクトは、仕様拡張機能を使用して拡張できます。
OAuth Flowsオブジェクト
サポートされている OAuth フローの構成の詳細
固定フィールド
| フィールド名 | タイプ | に適用されます | 説明 |
|---|---|---|---|
| 認証URL | string | oauth2( "implicit"、"authorizationCode") | 必須。このフローに使用される認可 URL。これは URL の形式でなければなりません。OAuth2 標準では TLS の使用が必要です。 |
| トークンURL | string | oauth2( "password"、"clientCredentials"、"authorizationCode") | 必須。このフローに使用されるトークン URL。これは URL の形式でなければなりません。OAuth2 標準では TLS の使用が必要です。 |
| リフレッシュURL | string | oauth2 | リフレッシュトークンを取得するために使用されるURL。これは URL の形式でなければなりません。OAuth2 標準では TLS の使用が必要です。 |
| スコープ | Map[ string, string] | oauth2 | 必須。OAuth2 セキュリティ方式で使用可能なスコープ。スコープ名とその短い説明の間のマップ。マップは空でも構いません。 |
このオブジェクトは、仕様拡張機能を使用して拡張できます。
OAuth Flowsオブジェクトの例
{ "type": "oauth2", "flows": { "implicit": { "authorizationUrl": "https://example.com/api/oauth/dialog", "scopes": { "write:pets": "modify pets in your account", "read:pets": "read your pets" } }, "authorizationCode": { "authorizationUrl": "https://example.com/api/oauth/dialog", "tokenUrl": "https://example.com/api/oauth/token", "scopes": { "write:pets": "modify pets in your account", "read:pets": "read your pets" } } }}
type: oauth2flows: implicit: authorizationUrl: https://example.com/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets authorizationCode: authorizationUrl: https://example.com/api/oauth/dialog tokenUrl: https://example.com/api/oauth/token scopes: write:pets: modify pets in your account read:pets: read your pets