Struct vault_client::Token [−][src]
pub struct Token { /* fields omitted */ }
Tokens are used by Vault clients to
authenticate themselves against a Vault server. This supports only renewable tokens (i.e.
created with -period="..."
).
Methods
impl Token
[src]
impl Token
pub fn try_new<S: Into<String>>(
token: S,
lifetime: Duration,
renew_period: Duration
) -> Result<Self>
[src]
pub fn try_new<S: Into<String>>(
token: S,
lifetime: Duration,
renew_period: Duration
) -> Result<Self>
Create a new token.
pub fn get_token_str(&self) -> &String
[src]
pub fn get_token_str(&self) -> &String
Read the actual value of the token. Be careful as to where this is recorded - it may be a security leak to write the token value in a log.
pub fn keep_updated<V: 'static + VaultApi + Send + Sync>(
self,
client: Arc<V>,
remote: &Remote,
cache_path: PathBuf
) -> Arc<NonEmptyPinboard<Self>>
[src]
pub fn keep_updated<V: 'static + VaultApi + Send + Sync>(
self,
client: Arc<V>,
remote: &Remote,
cache_path: PathBuf
) -> Arc<NonEmptyPinboard<Self>>
Helper function to keep a single Token
updated. The Token
returned can then be used to
update other Secret
s.
Trait Implementations
impl Debug for Token
[src]
impl Debug for Token
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Token
[src]
impl Clone for Token