ezidam + jwt: get key, import private key, create jwt claims and sign them
This commit is contained in:
parent
ef8d75ecee
commit
e99115e174
14 changed files with 217 additions and 5 deletions
|
|
@ -0,0 +1,13 @@
|
|||
select a.id,
|
||||
a.created_at as "created_at: DateTime<Utc>",
|
||||
a.updated_at as "updated_at: DateTime<Utc>",
|
||||
a.label,
|
||||
a.redirect_uri,
|
||||
a.secret,
|
||||
a.is_confidential as "is_confidential: bool",
|
||||
a.is_archived as "is_archived: bool"
|
||||
from apps a
|
||||
|
||||
inner join authorization_codes ac on a.id = ac.app
|
||||
|
||||
where ac.code is ?
|
||||
|
|
@ -648,6 +648,66 @@
|
|||
},
|
||||
"query": "select id,\n created_at as \"created_at: DateTime<Utc>\",\n updated_at as \"updated_at: DateTime<Utc>\",\n label,\n redirect_uri,\n secret,\n is_confidential as \"is_confidential: bool\",\n is_archived as \"is_archived: bool\"\nfrom apps\n\nwhere id is (?)\n"
|
||||
},
|
||||
"eaf0744f65a1de803fa8cc21b67bad4bdf22760d431265cf97b911e6456b2fd8": {
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"name": "id",
|
||||
"ordinal": 0,
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"name": "created_at: DateTime<Utc>",
|
||||
"ordinal": 1,
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"name": "updated_at: DateTime<Utc>",
|
||||
"ordinal": 2,
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"name": "label",
|
||||
"ordinal": 3,
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"name": "redirect_uri",
|
||||
"ordinal": 4,
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"name": "secret",
|
||||
"ordinal": 5,
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"name": "is_confidential: bool",
|
||||
"ordinal": 6,
|
||||
"type_info": "Int64"
|
||||
},
|
||||
{
|
||||
"name": "is_archived: bool",
|
||||
"ordinal": 7,
|
||||
"type_info": "Int64"
|
||||
}
|
||||
],
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
],
|
||||
"parameters": {
|
||||
"Right": 1
|
||||
}
|
||||
},
|
||||
"query": "select a.id,\n a.created_at as \"created_at: DateTime<Utc>\",\n a.updated_at as \"updated_at: DateTime<Utc>\",\n a.label,\n a.redirect_uri,\n a.secret,\n a.is_confidential as \"is_confidential: bool\",\n a.is_archived as \"is_archived: bool\"\nfrom apps a\n\n inner join authorization_codes ac on a.id = ac.app\n\nwhere ac.code is ?\n"
|
||||
},
|
||||
"eb1a0153c88b0b2744ed1b71df04a91a129a0173fbbc3e2536f52d41e8dc99c4": {
|
||||
"describe": {
|
||||
"columns": [
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue