You've already forked AstralRinth
forked from didirus/AstralRinth
* WIP end-of-day push * Authorize endpoint, accept endpoints, DB stuff for oauth clients, their redirects, and client authorizations * OAuth Client create route * Get user clients * Client delete * Edit oauth client * Include redirects in edit client route * Database stuff for tokens * Reorg oauth stuff out of auth/flows and into its own module * Impl OAuth get access token endpoint * Accept oauth access tokens as auth and update through AuthQueue * User OAuth authorization management routes * Forgot to actually add the routes lol * Bit o cleanup * Happy path test for OAuth and minor fixes for things it found * Add dummy data oauth client (and detect/handle dummy data version changes) * More tests * Another test * More tests and reject endpoint * Test oauth client and authorization management routes * cargo sqlx prepare * dead code warning * Auto clippy fixes * Uri refactoring * minor name improvement * Don't compile-time check the test sqlx queries * Trying to fix db concurrency problem to get tests to pass * Try fix from test PR * Fixes for updated sqlx * Prevent restricted scopes from being requested or issued * Get OAuth client(s) * Remove joined oauth client info from authorization returns * Add default conversion to OAuthError::error so we can use ? * Rework routes * Consolidate scopes into SESSION_ACCESS * Cargo sqlx prepare * Parse to OAuthClientId automatically through serde and actix * Cargo clippy * Remove validation requiring 1 redirect URI on oauth client creation * Use serde(flatten) on OAuthClientCreationResult
71 lines
2.0 KiB
JSON
71 lines
2.0 KiB
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "\n SELECT\n clients.id as \"id!\",\n clients.name as \"name!\",\n clients.icon_url as \"icon_url?\",\n clients.max_scopes as \"max_scopes!\",\n clients.secret_hash as \"secret_hash!\",\n clients.created as \"created!\",\n clients.created_by as \"created_by!\",\n uris.uri_ids as \"uri_ids?\",\n uris.uri_vals as \"uri_vals?\"\n FROM oauth_clients clients\n LEFT JOIN (\n SELECT client_id, array_agg(id) as uri_ids, array_agg(uri) as uri_vals\n FROM oauth_client_redirect_uris\n GROUP BY client_id\n ) uris ON clients.id = uris.client_id\n WHERE created_by = $1",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"ordinal": 0,
|
|
"name": "id!",
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"ordinal": 1,
|
|
"name": "name!",
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"ordinal": 2,
|
|
"name": "icon_url?",
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"ordinal": 3,
|
|
"name": "max_scopes!",
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"ordinal": 4,
|
|
"name": "secret_hash!",
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"ordinal": 5,
|
|
"name": "created!",
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"ordinal": 6,
|
|
"name": "created_by!",
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"ordinal": 7,
|
|
"name": "uri_ids?",
|
|
"type_info": "Int8Array"
|
|
},
|
|
{
|
|
"ordinal": 8,
|
|
"name": "uri_vals?",
|
|
"type_info": "TextArray"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
},
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
true,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
null,
|
|
null
|
|
]
|
|
},
|
|
"hash": "8bfb350d4f539a110b05f42812ea2593a1556ef214f3bed519de6b6e21c7d477"
|
|
}
|