MCPcopy Create free account
hub / github.com/bwt-dev/bwt / auth_method

Method auth_method

src/config.rs:431–441  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

429 }
430
431 pub fn auth_method(&self) -> Result<AuthMethod> {
432 Ok(
433 match (&self.auth_cookie, &self.auth_token, self.auth_ephemeral) {
434 (Some(cookie), None, false) => AuthMethod::Cookie(cookie.clone()),
435 (None, Some(token), false) => AuthMethod::UserProvided(token.clone()),
436 (None, None, true) => AuthMethod::Ephemeral,
437 (None, None, false) => AuthMethod::None,
438 _ => bail!("Invalid combination of authentication options"),
439 },
440 )
441 }
442
443 #[cfg(feature = "electrum")]
444 pub fn electrum_addr(&self) -> Option<net::SocketAddr> {

Callers 1

bootMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected