pub struct ResourceTokenParams<'a> {
pub resource: &'a str,
pub presented: &'a VerifiedToken,
pub agent_jkt: &'a str,
pub scope: &'a str,
pub budget: Option<&'a Budget>,
pub r3: Option<(&'a str, &'a str)>,
pub mission_expires_at: Option<i64>,
pub now: i64,
pub lifetime: i64,
}Expand description
What a resource token asks the Person Server for. Build one with
ResourceTokenParams::new.
Fields§
§resource: &'a strThis resource’s server identifier.
presented: &'a VerifiedTokenThe person or auth token this resource verified on the request.
agent_jkt: &'a strThumbprint of the key that signed the request.
scope: &'a strWhat the agent asks to do, as this resource names it.
budget: Option<&'a Budget>What the request costs, when it spends from a mission’s budget.
r3: Option<(&'a str, &'a str)>An R3 proposal: the URI of a document describing the request, and its
s256. The Person Server shows its display.summary to the approver.
mission_expires_at: Option<i64>When the presented token’s mission ends: no token outlives it.
now: i64Seconds since the epoch.
lifetime: i64Seconds the token is good for.
Implementations§
Source§impl<'a> ResourceTokenParams<'a>
impl<'a> ResourceTokenParams<'a>
Sourcepub fn new(
resource: &'a str,
presented: &'a VerifiedToken,
agent_jkt: &'a str,
scope: &'a str,
) -> Self
pub fn new( resource: &'a str, presented: &'a VerifiedToken, agent_jkt: &'a str, scope: &'a str, ) -> Self
A resource token for scope, issued now for
DEFAULT_RESOURCE_TOKEN_LIFETIME.
Trait Implementations§
Source§impl<'a> Clone for ResourceTokenParams<'a>
impl<'a> Clone for ResourceTokenParams<'a>
Auto Trait Implementations§
impl<'a> Freeze for ResourceTokenParams<'a>
impl<'a> RefUnwindSafe for ResourceTokenParams<'a>
impl<'a> Send for ResourceTokenParams<'a>
impl<'a> Sync for ResourceTokenParams<'a>
impl<'a> Unpin for ResourceTokenParams<'a>
impl<'a> UnsafeUnpin for ResourceTokenParams<'a>
impl<'a> UnwindSafe for ResourceTokenParams<'a>
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