MCPcopy Create free account
hub / github.com/BigBoot/AutoKuma / store_auth_token

Function store_auth_token

kuma-cli/src/utils.rs:160–170  ·  view source on GitHub ↗
(auth_token: &str)

Source from the content-addressed store, hash-verified

158}
159
160pub(crate) async fn store_auth_token(auth_token: &str) {
161 if let Some(auth_file) =
162 dirs::config_local_dir().map(|dir| dir.join("autokuma").join("auth.txt"))
163 {
164 _ = std::fs::create_dir_all(auth_file.parent().unwrap());
165
166 if let Err(err) = fs::write(auth_file, auth_token).await {
167 warn!("Failed to store auth token: {}", err);
168 }
169 }
170}
171
172pub(crate) async fn load_auth_token() -> Option<String> {
173 if let Some(auth_file) =

Callers 1

connectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected