pub struct SessionRequest { /* private fields */ }Expand description
Canonical narrowing request: 1..=16 unique scopes, at most 1024 scope bytes. Input order is normalized before hashing; duplicates are rejected.
Implementations§
Source§impl SessionRequest
impl SessionRequest
pub fn new( scopes: Vec<String>, ttl_secs: Option<u64>, ) -> Result<Self, SessionRequestError>
Sourcepub const fn ttl_secs(&self) -> Option<u64>
pub const fn ttl_secs(&self) -> Option<u64>
Exact requested TTL in seconds; None leaves selection to protected host policy.
pub fn scopes(&self) -> &[String]
Sourcepub fn expires_at_ns(
&self,
now_ns: u64,
default_ttl_secs: u64,
max_ttl_secs: u64,
) -> Result<u64, SessionRequestError>
pub fn expires_at_ns( &self, now_ns: u64, default_ttl_secs: u64, max_ttl_secs: u64, ) -> Result<u64, SessionRequestError>
Calculate a requested lease against protected TTL policy (maximum 1800s). This authenticates nothing and does not cap login or authority deadlines. The host supplies its clock and default/maximum policy, never the request.
Trait Implementations§
Source§impl Clone for SessionRequest
impl Clone for SessionRequest
Source§impl Debug for SessionRequest
impl Debug for SessionRequest
impl Eq for SessionRequest
Source§impl PartialEq for SessionRequest
impl PartialEq for SessionRequest
impl StructuralPartialEq for SessionRequest
Auto Trait Implementations§
impl Freeze for SessionRequest
impl RefUnwindSafe for SessionRequest
impl Send for SessionRequest
impl Sync for SessionRequest
impl Unpin for SessionRequest
impl UnsafeUnpin for SessionRequest
impl UnwindSafe for SessionRequest
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