mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 05:26:59 +00:00
feat: sso
This commit is contained in:
@@ -38,3 +38,6 @@ sentry-anyhow = { version = "0.38.1", optional = true }
|
||||
|
||||
# Core
|
||||
revolt-result = { version = "0.8.9", path = "../result", optional = true }
|
||||
|
||||
# Authifier
|
||||
authifier = "1.0.15"
|
||||
@@ -70,6 +70,7 @@ max_concurrent_connections = 50
|
||||
|
||||
[api.users]
|
||||
|
||||
[api.sso]
|
||||
|
||||
[pushd]
|
||||
# this changes the names of the queues to not overlap
|
||||
|
||||
@@ -5,6 +5,7 @@ use config::{Config, File, FileFormat};
|
||||
use futures_locks::RwLock;
|
||||
use once_cell::sync::Lazy;
|
||||
use serde::Deserialize;
|
||||
use authifier::config::SSO;
|
||||
|
||||
#[cfg(feature = "sentry")]
|
||||
pub use sentry::{capture_error, capture_message, Level};
|
||||
@@ -210,6 +211,7 @@ pub struct Api {
|
||||
pub security: ApiSecurity,
|
||||
pub workers: ApiWorkers,
|
||||
pub users: ApiUsers,
|
||||
pub sso: SSO,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
|
||||
@@ -209,6 +209,8 @@ impl Database {
|
||||
} else {
|
||||
EmailVerificationConfig::Disabled
|
||||
},
|
||||
sso: config.api.sso.clone(),
|
||||
server_url: Some(config.hosts.api.parse().expect("Failed to parse API host url.")),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@@ -244,6 +246,7 @@ impl Database {
|
||||
event_channel: Some(crate::tasks::authifier_relay::sender()),
|
||||
#[cfg(not(feature = "tasks"))]
|
||||
event_channel: None,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user