1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-29 22:01:14 +03:00

Make the access tokens TTL configurable

This commit is contained in:
Quentin Gliech
2023-08-31 16:30:08 +02:00
parent 73d33dfccb
commit bc04860afb
11 changed files with 155 additions and 93 deletions

View File

@ -18,7 +18,9 @@ use anyhow::Context;
use clap::Parser;
use itertools::Itertools;
use mas_config::AppConfig;
use mas_handlers::{AppState, CookieManager, HttpClientFactory, MatrixHomeserver, MetadataCache};
use mas_handlers::{
AppState, CookieManager, HttpClientFactory, MatrixHomeserver, MetadataCache, SiteConfig,
};
use mas_listener::{server::Server, shutdown::ShutdownStream};
use mas_matrix_synapse::SynapseConnection;
use mas_router::UrlBuilder;
@ -137,6 +139,11 @@ impl Options {
http_client_factory.clone(),
);
let site_config = SiteConfig {
access_token_ttl: config.hack.access_token_ttl,
compat_token_ttl: config.hack.compat_token_ttl,
};
// Explicitly the config to properly zeroize secret keys
drop(config);
@ -159,6 +166,7 @@ impl Options {
graphql_schema,
http_client_factory,
password_manager,
site_config,
conn_acquisition_histogram: None,
};
s.init_metrics()?;