MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / read_token

Method read_token

nodedb/src/control/security/keystore/vault.rs:66–76  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

64 }
65
66 fn read_token(&self) -> Result<String> {
67 check_key_file(&self.token_path)?;
68 std::fs::read_to_string(&self.token_path)
69 .map(|s| s.trim().to_owned())
70 .map_err(|e| crate::Error::Encryption {
71 detail: format!(
72 "failed to read Vault token from {}: {e}",
73 self.token_path.display()
74 ),
75 })
76 }
77
78 fn read_ciphertext_blob(&self) -> Result<String> {
79 check_key_file(&self.ciphertext_blob_path)?;

Callers 2

decrypt_with_vaultMethod · 0.80
rewrap_with_vaultMethod · 0.80

Calls 1

check_key_fileFunction · 0.85

Tested by

no test coverage detected