pub struct ArminiusConfig {
pub server_name: OwnedServerName,
pub addr: SocketAddr,
pub client_base_url: Url,
pub oidc_well_known: Option<Url>,
pub scim_base_url: Option<Url>,
pub scim_token_endpoint: Option<String>,
pub scim_client_id: Option<String>,
pub scim_client_secret: Option<String>,
pub proxy_url: Option<Url>,
pub extra_ca_certs: Vec<PathBuf>,
}Expand description
The configuration for an instance of Arminius
Fields§
§server_name: OwnedServerNameThe name of the homeserver we are hosting https://spec.matrix.org/v1.14/appendices/#server-name
addr: SocketAddrThe address on which the component will be listening
client_base_url: UrlThe URL that clients should connect to
oidc_well_known: Option<Url>The OIDC base URL
scim_base_url: Option<Url>SCIM base URL used for user and session sync
scim_token_endpoint: Option<String>OAuth token endpoint URL used to obtain the access token for SCIM
scim_client_id: Option<String>OAuth client ID used to obtain the access token for SCIM
scim_client_secret: Option<String>OAuth client secret used to obtain the access token for SCIM
proxy_url: Option<Url>URL for the outgoing proxy
extra_ca_certs: Vec<PathBuf>Custom CA certificates
Implementations§
Source§impl ArminiusConfig
impl ArminiusConfig
Sourcepub fn new(
server_name: OwnedServerName,
addr: impl Into<SocketAddr>,
client_base_url: Url,
oidc_well_known: impl Into<Option<Url>>,
scim_base_url: impl Into<Option<Url>>,
scim_token_endpoint: impl Into<Option<String>>,
scim_client_id: impl Into<Option<String>>,
scim_client_secret: impl Into<Option<String>>,
proxy_url: impl Into<Option<Url>>,
extra_ca_certs: &[PathBuf],
) -> Self
pub fn new( server_name: OwnedServerName, addr: impl Into<SocketAddr>, client_base_url: Url, oidc_well_known: impl Into<Option<Url>>, scim_base_url: impl Into<Option<Url>>, scim_token_endpoint: impl Into<Option<String>>, scim_client_id: impl Into<Option<String>>, scim_client_secret: impl Into<Option<String>>, proxy_url: impl Into<Option<Url>>, extra_ca_certs: &[PathBuf], ) -> Self
Create a new ArminiusConfig
Sourcepub fn from_env() -> Result<Self, ArminiusConfigurationError>
pub fn from_env() -> Result<Self, ArminiusConfigurationError>
Reads the configuration from the environment
Sourcepub fn for_test_using_ipv4() -> Self
pub fn for_test_using_ipv4() -> Self
Generate a config for testing purposes, assigning a random local port Server name and address will be IPv4 based.
Sourcepub fn for_test_using_ipv6() -> Self
pub fn for_test_using_ipv6() -> Self
Generate a config for testing purposes, assigning a random local port. Server name and address will be IPv6 based.
Sourcepub fn test_config_for(bind_to_ipv6: bool) -> Self
pub fn test_config_for(bind_to_ipv6: bool) -> Self
Generate a config for testing purposes, assigning a random local port.
Trait Implementations§
Source§impl Clone for ArminiusConfig
impl Clone for ArminiusConfig
Source§fn clone(&self) -> ArminiusConfig
fn clone(&self) -> ArminiusConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more