Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

APIサーバにおけるトークン認証をdigる / Diggin token authentica...

oika
August 31, 2024

APIサーバにおけるトークン認証をdigる / Diggin token authentication on API servers

oika

August 31, 2024
Tweet

Other Decks in Programming

Transcript

  1. +--------+ +---------------+ | |--(A)------- Authorization Grant --------->| | | |

    | | | |<-(B)----------- Access Token -------------| | | | & Refresh Token | | | | | | | | +----------+ | | | |--(C)---- Access Token ---->| | | | | | | | | | | |<-(D)- Protected Resource --| Resource | | Authorization | | Client | | Server | | Server | | |--(E)---- Access Token ---->| | | | | | | | | | | |<-(F)- Invalid Token Error -| | | | | | +----------+ | | | | | | | |--(G)----------- Refresh Token ----------->| | | | | | | |<-(H)----------- Access Token -------------| | +--------+ & Optional Refresh Token +---------------+ Figure 2: Refreshing an Expired Access Token (RFC 6749 より)
  2. Q. 実在する API は? A. 以下はいずれも実在 米国石油協会 (American Petroleum Institute)

    医薬品有効成分 (Active Pharmaceutical Ingredient) 大気汚染指数 (Air Pollution Index) ※マレーシアでは Air Pollutant Index
  3. ありがとうございました 参考資料 The OAuth 2.0 Authorization Framework https://datatracker.ietf.org/doc/html/rfc6749 JSON Web

    Token (JWT) https://datatracker.ietf.org/doc/html/rfc7519 OAuth 2.0 Security Best Current Practice draft-ietf-oauth-security-topics-14 https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics-14 OAuth & OpenID Connect 関連仕様まとめ https://qiita.com/TakahikoKawasaki/items/185d34814eb9f7ac7ef3 OAuth 2.0 + OpenID Connect のフルスクラッチ実装者が知見を語る https://qiita.com/TakahikoKawasaki/items/f2a0d25a4f05790b3baa 【第二弾】OAuth 2.0 + OpenID Connect のフルスクラッチ実装者が知見を語る https://qiita.com/TakahikoKawasaki/items/30fbd546935cea914e4f APIトークン認証の論理設計 https://zenn.dev/ad5/articles/fae2e929fca79e JWT認証の流れを理解する https://qiita.com/asagohan2301/items/cef8bcb969fef9064a5c