pub struct Claims {
pub sub: String,
pub iat: u64,
pub exp: u64,
pub scope: Vec<Scope>,
pub team_id: Option<String>,
pub org_id: Option<String>,
}Expand description
JWT claims payload.
Fields§
§sub: StringSubject: the API key ID that this token was issued for.
iat: u64Issued-at timestamp (Unix epoch seconds).
exp: u64Expiry timestamp (Unix epoch seconds).
scope: Vec<Scope>Scopes granted to this token.
team_id: Option<String>AAASM-3139 — the team this token is scoped to. When present, a
non-admin caller is confined to its own team for per-tenant data
(e.g. /costs, /agents/{id}/budget). None on legacy tokens
issued before tenant claims existed, which therefore carry no team
scope (and remain admin-gated for cross-tenant data).
org_id: Option<String>AAASM-3139 — the org this token is scoped to. See Claims::team_id.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Claims
impl<'de> Deserialize<'de> for Claims
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Claims
impl RefUnwindSafe for Claims
impl Send for Claims
impl Sync for Claims
impl Unpin for Claims
impl UnsafeUnpin for Claims
impl UnwindSafe for Claims
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