From 8db34c9eedc539fac6cade23edf44b753e74c091 Mon Sep 17 00:00:00 2001 From: sebadob Date: Fri, 1 Dec 2023 18:03:42 +0100 Subject: [PATCH 1/2] fix scopes migration Signed-off-by: sebadob --- rauthy-models/src/migration/db_migrate.rs | 26 ++++++++++++++--------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/rauthy-models/src/migration/db_migrate.rs b/rauthy-models/src/migration/db_migrate.rs index 0481013c..22928810 100644 --- a/rauthy-models/src/migration/db_migrate.rs +++ b/rauthy-models/src/migration/db_migrate.rs @@ -533,11 +533,14 @@ pub async fn migrate_from_sqlite( .await?; sqlx::query("delete from scopes").execute(db_to).await?; for b in before { - sqlx::query("insert into scopes (id, name) values ($1, $2)") - .bind(b.id) - .bind(b.name) - .execute(db_to) - .await?; + sqlx::query( + r#"insert into scopes (id, name, attr_include_access, attr_include_id) + values ($1, $2, $3, $4)"#, + ) + .bind(b.id) + .bind(b.name) + .execute(db_to) + .await?; } // USER ATTR CONFIG @@ -907,11 +910,14 @@ pub async fn migrate_from_postgres( .await?; sqlx::query("delete from scopes").execute(db_to).await?; for b in before { - sqlx::query("insert into scopes (id, name) values ($1, $2)") - .bind(b.id) - .bind(b.name) - .execute(db_to) - .await?; + sqlx::query( + r#"insert into scopes (id, name, attr_include_access, attr_include_id) + values ($1, $2, $3, $4)"#, + ) + .bind(b.id) + .bind(b.name) + .execute(db_to) + .await?; } // USER ATTR CONFIG From b6bb6827585f87e6349930eb3d4d03befe40edd1 Mon Sep 17 00:00:00 2001 From: sebadob Date: Fri, 1 Dec 2023 18:03:52 +0100 Subject: [PATCH 2/2] update comments Signed-off-by: sebadob --- rauthy-client/src/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rauthy-client/src/lib.rs b/rauthy-client/src/lib.rs index 2da04c85..6e1c5aa6 100644 --- a/rauthy-client/src/lib.rs +++ b/rauthy-client/src/lib.rs @@ -6,12 +6,13 @@ //! with the least amount of overhead and secure default values, if you only use //! [Rauthy](https://github.com/sebadob/rauthy) anyway. //! -//! This client should work without any issues with other OIDC providers as well, as long as they -//! support the S256 PKCE flow. However, this was only tested against -//! [Rauthy](https://github.com/sebadob/rauthy). -//! //! You can find examples for `actix-web`, `axum` or a fully generic framework / application in the //! [Examples](https://github.com/sebadob/rauthy/tree/main/rauthy-client/examples) directory. +//! +//! # Features +//! +//! - `actix-web` will enable actix-web specific extractors and handlers +//! - `axum` will enable axum specific extractors and handlers use crate::provider::OidcProvider; use base64::{engine, engine::general_purpose, Engine as _};