You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -202,6 +202,37 @@ async def main():
202
202
return api_response
203
203
```
204
204
205
+
> **Note:**`api_issuer` accepts either a hostname (e.g., `issuer.fga.example`, which defaults to `https://<hostname>/oauth/token`) or a full token endpoint URL (e.g., `https://oauth.fga.example/token`). Use the full URL when your OAuth2 provider uses a non-standard token endpoint path.
206
+
207
+
#### OAuth2 Client Credentials (Standard OAuth2)
208
+
209
+
For OAuth2 providers that use `scope` instead of `audience`:
210
+
211
+
```python
212
+
from openfga_sdk import ClientConfiguration, OpenFgaClient
213
+
from openfga_sdk.credentials import Credentials, CredentialConfiguration
214
+
215
+
216
+
asyncdefmain():
217
+
configuration = ClientConfiguration(
218
+
api_url=FGA_API_URL, # required
219
+
store_id=FGA_STORE_ID, # optional
220
+
authorization_model_id=FGA_MODEL_ID, # optional
221
+
credentials=Credentials(
222
+
method='client_credentials',
223
+
configuration=CredentialConfiguration(
224
+
api_issuer="https://oauth.fga.example/token", # full token endpoint URL
0 commit comments