Skip to content

Commit 4a65164

Browse files
committed
Update diagrams per Tim's feedback
- JWT sequence: label step 2 as tinymceai_token_provider callback rather than inventing a specific endpoint - Overview flowchart: move token endpoint into Application layer, route SSE response back through load balancer, simplify LB↔AI to bidirectional HTTP/SSE edge
1 parent a665e32 commit 4a65164

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

modules/ROOT/images/tinymceai-on-premises/jwt-authentication-fig-1.mmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sequenceDiagram
77
participant LLM as LLM provider
88

99
User->>Editor: Triggers an AI feature
10-
Editor->>App: POST /api/ai-token<br>session cookie or Bearer
10+
Editor->>App: tinymceai_token_provider callback<br>(e.g. POST /api/ai-token)
1111
App->>App: Authenticate the user
1212
Note over App: Sign HS256 JWT with API Secret<br>aud = environment ID<br>sub = user ID<br>auth.ai.permissions = [...]
1313
App-->>Editor: { "token": "eyJ..." }

modules/ROOT/images/tinymceai-on-premises/jwt-authentication-fig-1.svg

Lines changed: 1 addition & 1 deletion
Loading

modules/ROOT/images/tinymceai-on-premises/overview-fig-2.mmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#ECECFF', 'primaryBorderColor': '#9370DB', 'lineColor': '#333333', 'edgeLabelBackground': '#e8e8e8', 'fontSize': '16px' }, 'flowchart': { 'nodeSpacing': 40, 'rankSpacing': 80 }}}%%
22
flowchart LR
3-
subgraph Client["Client layer"]
4-
Token["Token endpoint\n(back end)"]
3+
subgraph Browser["Browser"]
54
App["TinyMCE editor\n(browser)"]
65
end
76

87
subgraph Service["Application layer"]
8+
Token["Token endpoint\n(your server)"]
99
LB["Load balancer /\nreverse proxy\n(TLS termination)"]
1010
AI["AI service\n(container)"]
1111
end
@@ -21,10 +21,10 @@ flowchart LR
2121
App -->|"1. request JWT"| Token
2222
Token -->|"JWT"| App
2323
App -->|"2. HTTPS"| LB
24-
LB -->|"HTTP"| AI
24+
LB <-->|"HTTP / SSE"| AI
2525
AI -->|"3. HTTPS"| LLM
2626
LLM -->|"4. stream"| AI
27-
AI -->|"5. SSE response"| App
27+
LB -->|"5. SSE"| App
2828
AI <-->|"read/write"| DB
2929
AI <-->|"read/write"| Redis
3030
AI <-->|"read/write"| Storage

0 commit comments

Comments
 (0)