1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-31 09:24:31 +03:00

Allow setting a different issuer from the public base URL

This commit is contained in:
Quentin Gliech
2023-06-26 17:36:40 +02:00
parent 5fc4303470
commit 125a6bdf11
8 changed files with 25 additions and 10 deletions

View File

@ -83,7 +83,8 @@ impl Options {
let policy_factory = policy_factory_from_config(&config.policy).await?;
let policy_factory = Arc::new(policy_factory);
let url_builder = UrlBuilder::new(config.http.public_base.clone());
let url_builder =
UrlBuilder::new(config.http.public_base.clone(), config.http.issuer.clone());
// Load and compile the templates
let templates = templates_from_config(&config.templates, &url_builder).await?;

View File

@ -44,7 +44,8 @@ impl Options {
let clock = SystemClock::default();
// XXX: we should disallow SeedableRng::from_entropy
let mut rng = rand_chacha::ChaChaRng::from_entropy();
let url_builder = mas_router::UrlBuilder::new("https://example.com/".parse()?);
let url_builder =
mas_router::UrlBuilder::new("https://example.com/".parse()?, None);
let templates = Templates::load(path, url_builder).await?;
templates.check_render(clock.now(), &mut rng).await?;

View File

@ -37,7 +37,8 @@ impl Options {
info!("Connecting to the database");
let pool = database_from_config(&config.database).await?;
let url_builder = UrlBuilder::new(config.http.public_base.clone());
let url_builder =
UrlBuilder::new(config.http.public_base.clone(), config.http.issuer.clone());
// Load and compile the templates
let templates = templates_from_config(&config.templates, &url_builder).await?;