summaryrefslogtreecommitdiff
path: root/src/repo/token.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/repo/token.rs')
-rw-r--r--src/repo/token.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/repo/token.rs b/src/repo/token.rs
index 4eaa6ea..8276bea 100644
--- a/src/repo/token.rs
+++ b/src/repo/token.rs
@@ -17,8 +17,8 @@ impl<'c> Provider for Transaction<'c, Sqlite> {
pub struct Tokens<'t>(&'t mut SqliteConnection);
impl<'c> Tokens<'c> {
- /// Issue a new token for an existing login. The issued_at timestamp will
- /// be used to control expiry, until the token is actually used.
+ // Issue a new token for an existing login. The issued_at timestamp will
+ // be used to control expiry, until the token is actually used.
pub async fn issue(
&mut self,
login: &Login,
@@ -43,7 +43,7 @@ impl<'c> Tokens<'c> {
Ok(secret)
}
- /// Revoke a token by its secret.
+ // Revoke a token by its secret.
pub async fn revoke(&mut self, secret: &str) -> Result<(), sqlx::Error> {
sqlx::query!(
r#"
@@ -60,8 +60,8 @@ impl<'c> Tokens<'c> {
Ok(())
}
- /// Expire and delete all tokens that haven't been used more recently than
- /// ``expire_at``.
+ // Expire and delete all tokens that haven't been used more recently than
+ // `expire_at`.
pub async fn expire(&mut self, expire_at: &DateTime) -> Result<(), sqlx::Error> {
sqlx::query!(
r#"
@@ -77,9 +77,9 @@ impl<'c> Tokens<'c> {
Ok(())
}
- /// Validate a token by its secret, retrieving the associated Login record.
- /// Will return [None] if the token is not valid. The token's last-used
- /// timestamp will be set to `used_at`.
+ // Validate a token by its secret, retrieving the associated Login record.
+ // Will return [None] if the token is not valid. The token's last-used
+ // timestamp will be set to `used_at`.
pub async fn validate(
&mut self,
secret: &str,