* Add support for access tokens using MAS * use 1.13.0 * Update dependencies * Harden auth credential selection in matrix link init Use the same non-empty access-token criterion for auth mode selection and bind the token directly from the branch condition. Return explicit configuration errors for missing or empty `device_id`/`password` instead of panicking, so invalid auth config fails gracefully. * Centralize and harden user auth config handling Move authentication-mode resolution into typed config parsing with ConfigUserAuth, so downstream login setup consumes validated credentials instead of re-checking raw optional fields. Enforce explicit password-vs-token selection, validate token/device/user-id requirements in one place, and normalize empty auth env overrides to unset values for consistent behavior across YAML and environment input. * Add auth config unit tests Move auth_config tests into a dedicated cfg test module file to keep production config code compact while preserving behavior coverage. The tests cover password/token mode selection, missing/both auth method rejection, missing device_id, and empty-value handling. * Use conventional mxlink version requirement Replace the unconventional wildcard lower-bound expression with a standard semver lower bound for readability and tooling consistency. --------- Co-authored-by: Slavi Pantaleev <slavi@devture.com>
6 lines
94 B
Rust
6 lines
94 B
Rust
mod config;
|
|
pub mod defaults;
|
|
pub mod env;
|
|
|
|
pub use config::{Avatar, Config, ConfigUserAuth};
|