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

@ -59,4 +59,18 @@ impl Apps {
.await
.map_err(handle_error)
}
pub async fn get_one_from_authorization_code(
conn: impl SqliteExecutor<'_>,
code: &str,
) -> Result<Option<Self>, Error> {
sqlx::query_file_as!(
Self,
"queries/apps/get_one_from_authorization_code.sql",
code
)
.fetch_optional(conn)
.await
.map_err(handle_error)
}
}