ezidam: apps: archive, and revoke refresh tokens associated with app

This commit is contained in:
Philippe Loctaux 2023-04-02 01:59:40 +02:00
parent 956f28f7e5
commit e06bd31b4c
11 changed files with 159 additions and 2 deletions

View file

@ -72,4 +72,11 @@ impl RefreshToken {
pub async fn use_token(&self, conn: impl SqliteExecutor<'_>) -> Result<Option<()>, Error> {
Ok(DatabaseRefreshTokens::use_token(conn, &self.token).await?)
}
pub async fn revoke_all_for_app(
conn: impl SqliteExecutor<'_>,
app: &AppID,
) -> Result<Option<()>, Error> {
Ok(DatabaseRefreshTokens::revoke_all_for_app(conn, app.as_ref()).await?)
}
}