diff options
Diffstat (limited to 'src/login/extract.rs')
| -rw-r--r-- | src/login/extract.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/login/extract.rs b/src/login/extract.rs index 735bc22..bda55cd 100644 --- a/src/login/extract.rs +++ b/src/login/extract.rs @@ -7,11 +7,20 @@ use axum_extra::extract::cookie::{Cookie, CookieJar}; // The usage pattern here - receive the extractor as an argument, return it in // the response - is heavily modelled after CookieJar's own intended usage. +#[derive(Clone, Debug)] pub struct IdentityToken { cookies: CookieJar, } impl IdentityToken { + /// Creates a new, unpopulated identity token store. + #[cfg(test)] + pub fn new() -> Self { + Self { + cookies: CookieJar::new(), + } + } + /// Get the identity secret sent in the request, if any. If the identity /// was not sent, or if it has previously been [clear]ed, then this will /// return [None]. If the identity has previously been [set], then this |
