Skip to content

Commit bd3ff0b

Browse files
committed
cleanup
update readme
1 parent 2f73cc3 commit bd3ff0b

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed

authorization-for-rag/README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,40 @@ Explore the following examples demonstrating the integration of **Auth0 FGA** wi
2323

2424
- **LangChain with FGARetriever (JavaScript):**
2525
An implementation showcasing how to wrap a LangChain retriever with FGARetriever to enforce authorization checks during document retrieval.
26-
[View Example](https://github.com/oktadev/auth0-ai-samples/tree/main/authorization-for-rag/lanchain-js)
26+
[View Example](https://github.com/auth0-samples/auth0-ai-samples/tree/main/authorization-for-rag/lanchain-js)
2727

2828
- **LangChain with FGARetriever (Python):**
2929
A Python implementation demonstrating authorization-aware document retrieval using LangChain and FGARetriever.
30-
[View Example](https://github.com/oktadev/auth0-ai-samples/tree/main/authorization-for-rag/langchain-python)
30+
[View Example](https://github.com/auth0-samples/auth0-ai-samples/tree/main/authorization-for-rag/langchain-python)
3131

3232
- **LangGraph with FGARetriever (Python):**
3333
Shows how to integrate FGARetriever with LangGraph for authorized document retrieval in Python applications.
34-
[View Example](https://github.com/oktadev/auth0-ai-samples/tree/main/authorization-for-rag/langgraph-python)
34+
[View Example](https://github.com/auth0-samples/auth0-ai-samples/tree/main/authorization-for-rag/langgraph-python)
3535

3636
- **LangChain4j with FGARetriever (Java):**
3737
A Java implementation demonstrating authorization-aware document retrieval using LangChain4j and FGARetriever.
38-
[View Example](https://github.com/oktadev/auth0-ai-samples/tree/main/authorization-for-rag/langchain4j-java)
38+
[View Example](https://github.com/auth0-samples/auth0-ai-samples/tree/main/authorization-for-rag/langchain4j-java)
3939

4040
- **LangGraph Agentic with FGARetriever (JavaScript):**
4141
Shows how to integrate FGARetriever with LangGraph's agentic framework for authorized document retrieval in JavaScript.
42-
[View Example](https://github.com/oktadev/auth0-ai-samples/tree/main/authorization-for-rag/langgraph-agentic-js)
42+
[View Example](https://github.com/auth0-samples/auth0-ai-samples/tree/main/authorization-for-rag/langgraph-agentic-js)
4343

4444
- **LangGraph StateGraph with FGARetriever (JavaScript):**
4545
Demonstrates using FGARetriever with LangGraph's state graph approach for authorized retrieval in JavaScript.
46-
[View Example](https://github.com/oktadev/auth0-ai-samples/tree/main/authorization-for-rag/langgraph-stategraph-js)
46+
[View Example](https://github.com/auth0-samples/auth0-ai-samples/tree/main/authorization-for-rag/langgraph-stategraph-js)
4747

4848
- **LlamaIndex with FGARetriever (JavaScript):**
4949
An implementation showing how to use FGARetriever with LlamaIndex for authorized document retrieval in JavaScript.
50-
[View Example](https://github.com/oktadev/auth0-ai-samples/tree/main/authorization-for-rag/llamaindex-js)
50+
[View Example](https://github.com/auth0-samples/auth0-ai-samples/tree/main/authorization-for-rag/llamaindex-js)
5151

5252
- **LlamaIndex Agentic with FGARetriever (JavaScript):**
5353
Shows how to combine FGARetriever with LlamaIndex's agentic capabilities for authorized retrieval in JavaScript.
54-
[View Example](https://github.com/oktadev/auth0-ai-samples/tree/main/authorization-for-rag/llamaindex-agentic-js)
54+
[View Example](https://github.com/auth0-samples/auth0-ai-samples/tree/main/authorization-for-rag/llamaindex-agentic-js)
5555

5656
- **OpenAI with FGARetriever (JavaScript):**
5757
A direct implementation using OpenAI's APIs with FGARetriever for authorized document retrieval in JavaScript.
58-
[View Example](https://github.com/oktadev/auth0-ai-samples/tree/main/authorization-for-rag/openai-fga-js)
58+
[View Example](https://github.com/auth0-samples/auth0-ai-samples/tree/main/authorization-for-rag/openai-fga-js)
59+
60+
- **Vercel AI with FGAFilter (JavaScript):**
61+
A direct implementation using Vercel AI SDk with FGAFilter for authorized document retrieval in JavaScript.
62+
[View Example](https://github.com/auth0-samples/auth0-ai-samples/tree/main/authorization-for-rag/vercel-ai-js)

authorization-for-rag/openai-fga-python/.config.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
OPENAI_API_KEY=<your-api-key>
44

55
# Auth0 FGA
6-
[OKTAFGA]
6+
[AUTH0FGA]
77
FGA_STORE_ID=<your-store-id>
88
FGA_CLIENT_ID=<your-client-id>
99
FGA_CLIENT_SECRET=<your-client-secret>

authorization-for-rag/openai-fga-python/helpers/retriever.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ def __init__(self, args: FGARetrieverArgs):
1818
self.documents = args.documents
1919
self.build_query = args.build_query
2020
self._fga_configuration = ClientConfiguration(
21-
api_url=config["OKTAFGA"]["FGA_API_URL"],
22-
store_id=config["OKTAFGA"]["FGA_STORE_ID"],
21+
api_url=config["AUTH0FGA"]["FGA_API_URL"],
22+
store_id=config["AUTH0FGA"]["FGA_STORE_ID"],
2323
credentials=Credentials(
2424
method="client_credentials",
2525
configuration=CredentialConfiguration(
26-
api_issuer=config["OKTAFGA"]["FGA_API_TOKEN_ISSUER"],
27-
api_audience=config["OKTAFGA"]["FGA_API_AUDIENCE"],
28-
client_id=config["OKTAFGA"]["FGA_CLIENT_ID"],
29-
client_secret=config["OKTAFGA"]["FGA_CLIENT_SECRET"],
26+
api_issuer=config["AUTH0FGA"]["FGA_API_TOKEN_ISSUER"],
27+
api_audience=config["AUTH0FGA"]["FGA_API_AUDIENCE"],
28+
client_id=config["AUTH0FGA"]["FGA_CLIENT_ID"],
29+
client_secret=config["AUTH0FGA"]["FGA_CLIENT_SECRET"],
3030
)
3131
)
3232
)

authorization-for-rag/openai-fga-python/scripts/fga_init.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212

1313
async def fga_setup(config):
1414
fga_config = ClientConfiguration(
15-
api_url=config["OKTAFGA"]["FGA_API_URL"],
16-
store_id=config["OKTAFGA"]["FGA_STORE_ID"],
15+
api_url=config["AUTH0FGA"]["FGA_API_URL"],
16+
store_id=config["AUTH0FGA"]["FGA_STORE_ID"],
1717
credentials=Credentials(
1818
method="client_credentials",
1919
configuration=CredentialConfiguration(
20-
api_issuer=config["OKTAFGA"]["FGA_API_TOKEN_ISSUER"],
21-
api_audience=config["OKTAFGA"]["FGA_API_AUDIENCE"],
22-
client_id=config["OKTAFGA"]["FGA_CLIENT_ID"],
23-
client_secret=config["OKTAFGA"]["FGA_CLIENT_SECRET"],
20+
api_issuer=config["AUTH0FGA"]["FGA_API_TOKEN_ISSUER"],
21+
api_audience=config["AUTH0FGA"]["FGA_API_AUDIENCE"],
22+
client_id=config["AUTH0FGA"]["FGA_CLIENT_ID"],
23+
client_secret=config["AUTH0FGA"]["FGA_CLIENT_SECRET"],
2424
)
2525
)
2626
)

0 commit comments

Comments
 (0)