remove undocumented jwt token login

This commit is contained in:
Jade Ellis 2025-01-11 16:04:19 +00:00 committed by June Clementine Strawberry 🍓🦴
parent 9ebb39ca4f
commit afe9e5536b
8 changed files with 4 additions and 76 deletions

View file

@ -18,7 +18,6 @@ pub struct Service {
pub db: Data,
pub config: Config,
jwt_decoding_key: Option<jsonwebtoken::DecodingKey>,
pub bad_event_ratelimiter: Arc<RwLock<HashMap<OwnedEventId, RateLimitState>>>,
pub server_user: OwnedUserId,
pub admin_alias: OwnedRoomAliasId,
@ -33,11 +32,6 @@ impl crate::Service for Service {
let db = Data::new(&args);
let config = &args.server.config;
let jwt_decoding_key = config
.jwt_secret
.as_ref()
.map(|secret| jsonwebtoken::DecodingKey::from_secret(secret.as_bytes()));
let turn_secret =
config
.turn_secret_file
@ -66,7 +60,6 @@ impl crate::Service for Service {
let mut s = Self {
db,
config: config.clone(),
jwt_decoding_key,
bad_event_ratelimiter: Arc::new(RwLock::new(HashMap::new())),
admin_alias: OwnedRoomAliasId::try_from(format!("#admins:{}", &config.server_name))
.expect("#admins:server_name is valid alias name"),
@ -158,10 +151,6 @@ impl Service {
pub fn trusted_servers(&self) -> &[OwnedServerName] { &self.config.trusted_servers }
pub fn jwt_decoding_key(&self) -> Option<&jsonwebtoken::DecodingKey> {
self.jwt_decoding_key.as_ref()
}
pub fn turn_password(&self) -> &String { &self.config.turn_password }
pub fn turn_ttl(&self) -> u64 { self.config.turn_ttl }