ezidam: refactor jwt and refresh token generate in "tokens" mod
This commit is contained in:
parent
23b1e3ea4f
commit
9687116063
13 changed files with 179 additions and 59 deletions
|
|
@ -19,6 +19,13 @@ pub async fn save_new_keys(
|
|||
.await?)
|
||||
}
|
||||
|
||||
pub async fn revoke_all_except_one(
|
||||
conn: impl SqliteExecutor<'_>,
|
||||
exception: &KeyID,
|
||||
) -> Result<Option<()>, Error> {
|
||||
Ok(DatabaseKeys::revoke_all_except_one(conn, &exception.0).await?)
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Key {
|
||||
id: KeyID,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue