This website requires JavaScript.
Explore
Help
Sign In
unfunny
/
baibot-withmcp
Watch
1
Star
0
Fork
0
You've already forked baibot-withmcp
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
Files
1b5c2fbdc183402665f44417f0bd5604b2e2c898
baibot-withmcp
/
src
/
entity
/
cfg
/
mod.rs
6 lines
94 B
Rust
Raw
Normal View
History
Unescape
Escape
Initial commit
2024-09-12 13:44:06 +03:00
mod
config
;
pub
mod
defaults
;
pub
mod
env
;
Add support for access tokens using MAS (#83) * 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>
2026-03-07 00:26:40 -08:00
pub
use
config
::
{
Avatar
,
Config
,
ConfigUserAuth
}
;
Reference in New Issue
Copy Permalink