pub struct JwtClaims {
pub sub: String,
pub iat: u64,
pub exp: u64,
pub iss: String,
pub tenant_id: Option<String>,
pub roles: Vec<String>,
}Expand description
Standard claims pylon mints. Apps that want extra claims can extend via the Custom variant.
Fields§
§sub: StringSubject — the user_id.
iat: u64Issued at (Unix seconds).
exp: u64Expiry (Unix seconds). Pylon defaults to 30d for parity with opaque sessions; apps can override.
iss: StringIssuer — PYLON_JWT_ISSUER if set, else pylon.
tenant_id: Option<String>Optional tenant id (Pylon-specific extension claim
https://pylonsync.com/tenant).
roles: Vec<String>Optional roles array.
Trait Implementations§
impl Eq for JwtClaims
impl StructuralPartialEq for JwtClaims
Auto Trait Implementations§
impl Freeze for JwtClaims
impl RefUnwindSafe for JwtClaims
impl Send for JwtClaims
impl Sync for JwtClaims
impl Unpin for JwtClaims
impl UnsafeUnpin for JwtClaims
impl UnwindSafe for JwtClaims
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