pub fn new(
  database_url: String,
  clients: std::collections::BTreeMap<String, (String, 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(DatabaseMultipleOpenIdConnect {
    clients,
    connection: diesel::r2d2::Pool::builder().build(manager).map_err(|e| format!("Failed to create OpenID Connect database connection: {}", e))?,
    registration,
  })
}
/// Create an OpenID Connect store that can use multiple providers
Create an OpenID Connect store that can use multiple providers
Create an OpenID Connect store that can use multiple providers
pub fn new(
  database_url: String,
  clients: std::collections::BTreeMap<String, (String, 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(DatabaseMultipleOpenIdConnect {
    clients,
    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 , clients : std :: collections :: BTreeMap < String , ( String , 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 ( DatabaseMultipleOpenIdConnect { clients , connection : diesel :: r2d2 :: Pool :: builder ( ) . build ( manager ) . map_err ( | e | format ! ( " " e ) ) ? , registration , } ) }
Create an OpenID Connect store that can use multiple providers
Create an OpenID Connect store that can use multiple providers
database_url
String
clients
std::collections::BTreeMap<String, (String, openidconnect::core::CoreClient)>
registration
super::OpenIdRegistration
database_url
String
clients
std::collections::BTreeMap<String, (String, openidconnect::core::CoreClient)>
registration
super::OpenIdRegistration