OAuth 2.0
OAuth 2.0
OAuth 2.0は認可フレームワークです。これにより、アプリは個人またはアプリ自体の保護されたデータを使用するための制限付き権限を取得できます。
もう一つの例
写真印刷アプリは、顧客を写真サービスの認可ページに送信し、PKCE付き認可コードを使用します。`state`および正確なリダイレクトURIを確認した後、`photos.read`に限定されたトークンを取得します。アクセスは取り消すことができ、プリンターは顧客のパスワードを決して見ることはありません。
主な部分
- 01リソース所有者およびクライアント
- 02認可サーバーと付与
- 03スコープ付きアクセストークンとリソースサーバー
以下の場合に使用します
信頼できる認可サーバーを通じて、限定的な API 権限を与えるために使用してください。その種類のクライアントに対する現在のセキュリティガイドラインに従ってください。
以下の場合は使用しないでください
OAuthはユーザー認証ではありません。ベアラートークンをURLに入れないでください。新しいシステムではImplicit Flowを使うか、自分自身のグラントタイプを作らないでください。
コードで使用する名前
Authorization Code + PKCE; scoped access token; exact redirect URI; state/issuer validation 出荷前に
Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.
Outcome:Complete the task with OAuth 2.0 (OAuth 2.0)。 User context:写真印刷アプリは、顧客を写真サービスの認可ページに送信し、PKCE付き認可コードを使用します。`state`および正確なリダイレクトURIを確認した後、`photos.read`に限定されたトークンを取得します。アクセスは取り消すことができ、プリンターは顧客のパスワードを決して見ることはありません。 Technical concept or control:OAuth 2.0 (OAuth 2.0)。 Why it fits:信頼できる認可サーバーを通じて、限定的な API 権限を与えるために使用してください。その種類のクライアントに対する現在のセキュリティガイドラインに従ってください。 Do not use it when:OAuthはユーザー認証ではありません。ベアラートークンをURLに入れないでください。新しいシステムではImplicit Flowを使うか、自分自身のグラントタイプを作らないでください。 Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary):この標準は、列挙された範囲のみを対象とします。視覚スタイル、製品の判断、またはVibularyの例は選びません。 Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.
このリクエストを確認する
Review how OAuth 2.0 (OAuth 2.0) is used now. Definition: OAuth 2.0は認可フレームワークです。これにより、アプリは個人またはアプリ自体の保護されたデータを使用するための制限付き権限を取得できます。 Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.