diff options
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/login.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/api/login.rs b/src/api/login.rs index c5cbe8d..0658a69 100644 --- a/src/api/login.rs +++ b/src/api/login.rs @@ -112,7 +112,11 @@ pub(crate) async fn bearer( let now = state.clock.now_millis().as_u64(); let verified = { let replica = state.doc.read().await; - token::verify(&replica.doc, &text, &swarm, now) + let verified = token::verify(&replica.doc, &text, &swarm, now); + #[cfg(feature = "federation")] + let verified = + verified.and_then(|claims| token::issued_here(&replica.doc, state.local_id(), claims)); + verified } .and_then(|claims| { // Ended here where the document can't record it (no registry). |
