pub struct Session { /* private fields */ }Expand description
The Auth session for the Kubernetes Backend, used by the vault client to authenticate requests
Implementations§
Trait Implementations§
Source§impl Auth for Session
impl Auth for Session
Source§fn is_expired(&self) -> bool
fn is_expired(&self) -> bool
Checking if the current session is expired and needs to be renewed or dropped Read more
Source§fn get_token(&self) -> String
fn get_token(&self) -> String
Returns the vault token that can be used to make requests to vault
as the current session Read more
Source§fn auth(&self, vault_url: &str) -> Result<(), Error>
fn auth(&self, vault_url: &str) -> Result<(), Error>
Used to actually authenticate with the backend and obain a new valid session
that can be used for further requests to vault Read more
Source§fn is_renewable(&self) -> bool
fn is_renewable(&self) -> bool
Returns if the current token can be renewed using this auth-backend.
This is used to decide whether or not to try to renew the session before
it is expired or letting the session expire and then simply obtaining a
new one the next time it is used. Read more
Source§fn get_total_duration(&self) -> u64
fn get_total_duration(&self) -> u64
Returns the total duration for which the current token is valid for
in seconds Read more
Auto Trait Implementations§
impl !Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more