ezidam + jwt: get key, import private key, create jwt claims and sign them

This commit is contained in:
Philippe Loctaux 2023-03-18 16:14:26 +01:00
parent ef8d75ecee
commit e99115e174
14 changed files with 217 additions and 5 deletions

View file

@ -58,4 +58,13 @@ impl App {
) -> Result<Option<Self>, Error> {
Ok(DatabaseApps::get_one_by_id(conn, id).await?.map(Self::from))
}
pub async fn get_one_from_authorization_code(
conn: impl SqliteExecutor<'_>,
code: &str,
) -> Result<Option<Self>, Error> {
Ok(DatabaseApps::get_one_from_authorization_code(conn, code)
.await?
.map(Self::from))
}
}