diff options
Diffstat (limited to 'src/login/extract.rs')
| -rw-r--r-- | src/login/extract.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/login/extract.rs b/src/login/extract.rs index bda55cd..542f879 100644 --- a/src/login/extract.rs +++ b/src/login/extract.rs @@ -13,7 +13,7 @@ pub struct IdentityToken { } impl IdentityToken { - /// Creates a new, unpopulated identity token store. + // Creates a new, unpopulated identity token store. #[cfg(test)] pub fn new() -> Self { Self { @@ -21,17 +21,17 @@ impl IdentityToken { } } - /// 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 - /// will return that secret, regardless of what the request originally - /// included. + // 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 + // will return that secret, regardless of what the request originally + // included. pub fn secret(&self) -> Option<&str> { self.cookies.get(IDENTITY_COOKIE).map(Cookie::value) } - /// Positively set the identity secret, and ensure that it will be sent - /// back to the client when this extractor is included in a response. + // Positively set the identity secret, and ensure that it will be sent + // back to the client when this extractor is included in a response. pub fn set(self, secret: &str) -> Self { let identity_cookie = Cookie::build((IDENTITY_COOKIE, String::from(secret))) .http_only(true) @@ -43,8 +43,8 @@ impl IdentityToken { } } - /// Remove the identity secret and ensure that it will be cleared when this - /// extractor is included in a response. + // Remove the identity secret and ensure that it will be cleared when this + // extractor is included in a response. pub fn clear(self) -> Self { Self { cookies: self.cookies.remove(IDENTITY_COOKIE), |
