<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>quoll00</author_name>
  <author_url>https://blog.hatena.ne.jp/quoll00/</author_url>
  <blog_title>Carpe Diem</blog_title>
  <blog_url>https://christina04.hatenablog.com/</blog_url>
  <categories>
    <anon>OpenFGA</anon>
  </categories>
  <description>概要 前回 christina04.hatenablog.com でOpenFGAについて紹介しました。 今回は実際にアプリケーションでどのように実装するかを説明します。 環境 OpenFGA Server 1.8.4 Go 1.24.0 全体イメージ アプリケーションサーバ、認証サーバ、認可サーバ（OpenFGA）の関係図は次のようになります。 ユーザ登録時・更新時にユーザ属性情報をOpenFGAにも登録しておく ログイン時にユーザ情報をJWTに含める リソースAPIを呼ぶ際に↑のJWTからOpenFGAで権限があるかチェックする 本番ではインメモリキャッシュするので都度通信は発生しない と…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchristina04.hatenablog.com%2Fentry%2Fauthorize-api-with-openfga&quot; title=&quot;OpenFGA でAPIのアクセス制御を実装する - Carpe Diem&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/q/quoll00/20250215/20250215044128.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-02-15 05:20:40</published>
  <title>OpenFGA でAPIのアクセス制御を実装する</title>
  <type>rich</type>
  <url>https://christina04.hatenablog.com/entry/authorize-api-with-openfga</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
