Skip to content

Commit

Permalink
Update Architecture section in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ligowsky committed May 30, 2024
1 parent 39283d8 commit a4b7a0e
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions docs/src/05.architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,40 @@ The package works by setting and reading Cookies in User's Browser. The Cookies

## AuthenticationStateProvider implementations

### InteractiveWebAssembly

```mermaid
sequenceDiagram
participant client as Blazor Client
participant provider as InteractiveWasmAuthenticationStateProvider
participant server as Blazor Server
client ->>+ provider: GetAuthenticationStateAsync
provider ->>+ server: Http request: /auth-state
server ->> server: if AccessToken expired: Refresh JwtPair
server ->> server: Retrieve Claims from cookies
server -->>- provider: Claims
note over server,provider: Http response updates browser cookies
provider ->> provider: Creates AuthenticationState <br/> from provided claims
provider -->>- client: AuthenticationState
```

### InteractiveServer

```mermaid
sequenceDiagram
participant client as Client
participant client as Blazor Client
participant server as Blazor Server
participant provider as InteractiveServerAuthenticationStateProvider
client ->>+ server: Render page (interactive)
server ->>+ provider: GetAuthenticationStateAsync
provider ->> provider: Generate unique request identifier
provider ->>+ server: Subscribe
Expand All @@ -37,5 +61,4 @@ server -->>- client: OK
provider ->> provider: Generate AuthenticationState
provider -->>- server: AuthenticationState
server ->> server: Render page
server -->>- client: Page
```

0 comments on commit a4b7a0e

Please sign in to comment.