pub struct SessionStore { /* private fields */ }Expand description
Manages session persistence on disk.
Implementations§
Source§impl SessionStore
impl SessionStore
pub fn new() -> Result<Self>
pub fn save(&self, session: &Session) -> Result<()>
pub fn load(&self, id: &str) -> Result<Session>
pub fn list(&self) -> Result<Vec<Session>>
pub fn update(&self, session: &Session) -> Result<()>
Sourcepub fn find_reusable(
&self,
allow_str: &str,
role_arn: &str,
min_remaining_secs: i64,
) -> Result<Option<Session>>
pub fn find_reusable( &self, allow_str: &str, role_arn: &str, min_remaining_secs: i64, ) -> Result<Option<Session>>
Find an active session with matching allow actions, role ARN, and enough remaining TTL. Used for credential caching — reuse existing sessions instead of issuing new ones.
Sourcepub fn find_reusable_for_provider(
&self,
allow_str: &str,
role_arn: &str,
min_remaining_secs: i64,
provider: CloudProvider,
resources: &[String],
) -> Result<Option<Session>>
pub fn find_reusable_for_provider( &self, allow_str: &str, role_arn: &str, min_remaining_secs: i64, provider: CloudProvider, resources: &[String], ) -> Result<Option<Session>>
Provider-aware session reuse lookup. Formats stored actions using the
correct delimiter for the provider so GCP/Azure sessions can be matched.
For Azure, principal_id disambiguates sessions on the same subscription
but different identities (service principals, users).
Auto Trait Implementations§
impl Freeze for SessionStore
impl RefUnwindSafe for SessionStore
impl Send for SessionStore
impl Sync for SessionStore
impl Unpin for SessionStore
impl UnsafeUnpin for SessionStore
impl UnwindSafe for SessionStore
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.