Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

How to intercept M2M token in OpenFGA's API calls ?

オープン
#131 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
java

調査の方向性

まず、issue に記載されているカスタム OpenFGA bean と RestClient requestInterceptor を確認し、続いて store-creation と AuthorizationModel の API 呼び出しを追跡します。M2M token がどこで作成され、それが各 request の authorization header に到達しているかを確認します。呼び出しが invalid bearer token エラーなしで正常に認証されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug
Description

Sub - Issue with Bearer Token and Store Creation in OpenFGA

I'm currently working with OpenFGA and I have a custom bean that overrides the default OpenFGA bean. The goal is to ensure that a store is created only once. When creating the store, if it doesn't already exist, it should be automatically created, and the store ID should be added to other AuthorizationModel APIs.

However, I'm running into an issue. I keep getting the error message "invalid bearer token." The M2M token is being created successfully, but for some reason, it’s not being properly intercepted when the store is created within the custom bean. This is causing the token to be invalid during the API calls.

As a workaround, I tried switching to direct API calls using the RestClient to call OpenFGA APIs. The RestClient provides an option for requestInterceptor(), but I’m struggling to set the M2M token in the header correctly. Despite my efforts, the token is still not being passed correctly, and I continue to face authentication issues.

Has anyone encountered a similar problem or have any advice on how to intercept and set the M2M token in the header when using the RestClient? Any insights or solutions would be greatly appreciated!

Thanks in advance!

Version of SDK

v0.4.0

主要言語
Java
スター
55
フォーク
26
平均マージ
1日 22時間
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

openfga/java-sdk のほかの issue

openfga/java-sdk の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。