pub fn new(
  database_url: String,
  client: openidconnect::core::CoreClient,
  registration: super::OpenIdRegistration,
) -> Result<std::sync::Arc<dyn crate::auth::AuthProvider>, String> {
  let manager = diesel::r2d2::ConnectionManager::<diesel::pg::PgConnection>::new(database_url);
  crate::auth::OpenIdConnect::new(DatabaseOpenIdConnect {
    client,
    connection: diesel::r2d2::Pool::builder().build(manager).map_err(|e| format!("Failed to create OpenID Connect database connection: {}", e))?,
    registration,
  })
}
/// Create a simple OpenID Connect store
Create a simple OpenID Connect store
Create a simple OpenID Connect store
pub fn new(
  database_url: String,
  client: openidconnect::core::CoreClient,
  registration: super::OpenIdRegistration,
) -> Result<std::sync::Arc<dyn crate::auth::AuthProvider>, String> {
  let manager = diesel::r2d2::ConnectionManager::<diesel::pg::PgConnection>::new(database_url);
  crate::auth::OpenIdConnect::new(DatabaseOpenIdConnect {
    client,
    connection: diesel::r2d2::Pool::builder().build(manager).map_err(|e| format!("Failed to create OpenID Connect database connection: {}", e))?,
    registration,
  })
}
pub fn new ( database_url : String , client : openidconnect :: core :: CoreClient , registration : super :: OpenIdRegistration , ) -> Result < std :: sync :: Arc < dyn crate :: auth :: AuthProvider > , String > { let manager = diesel :: r2d2 :: ConnectionManager :: < diesel :: pg :: PgConnection > :: new ( database_url ) ; crate :: auth :: OpenIdConnect :: new ( DatabaseOpenIdConnect { client , connection : diesel :: r2d2 :: Pool :: builder ( ) . build ( manager ) . map_err ( | e | format ! ( " " e ) ) ? , registration , } ) }
Create a simple OpenID Connect store
Create a simple OpenID Connect store
database_url
String
client
openidconnect::core::CoreClient
registration
super::OpenIdRegistration
database_url
String
client
openidconnect::core::CoreClient
registration
super::OpenIdRegistration