diff options
Diffstat (limited to 'src/api/mod.rs')
| -rw-r--r-- | src/api/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/api/mod.rs b/src/api/mod.rs index 6631bc9..97724ff 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -121,6 +121,11 @@ pub(crate) fn router(state: AppState, auth_state: AuthState, debug_api: bool) -> )) // Who has a password here (`/auth/keys`: a user's last key goes only then). .layer(axum::Extension(auth_state)) + // A stream answered to a token ends with it (expired, revoked, its session ended). + .layer(middleware::from_fn_with_state( + state.clone(), + login::streams_end, + )) // Outside authentication: a token, if the request brings one, names the user. .layer(middleware::from_fn_with_state(state.clone(), login::bearer)) // Outermost: pages of other origins, and their preflights, which bring no |
