pub struct JwtClaims {
pub sub: String,
pub iat: u64,
pub exp: u64,
pub pid: Option<u32>,
pub prefixed_pid: Option<u32>,
pub sid: Option<String>,
pub prefixed_sid: Option<String>,
pub kid: Option<u32>,
pub prefixed_kid: Option<u32>,
pub uid: Option<String>,
pub prefixed_uid: Option<String>,
}
Expand description
Claims required to form a valid Jwt.
These are a mixture of public claims (predefined by the JWT standard - sub, iat, exp) and private claims (pid, sid, kid, uid). The private claims can be protected from collision by prefixing the claim names with “http://ironcore/”. Some JWT generators such as Auth0 require a namespace on private claims. Note that the uid claim is a claim that is added by Auth0 - the sub claim is populated by the identity provider (if Auth0 is doing authentication via GitHub or another IDP), and the user’s ID (email address) is placed in the uid claim. The Identity service currently looks for the uid claim, and if it is present, uses that instead of the sub claim as the source of the user’s provided ID.
Fields§
§sub: String
Unique user ID
iat: u64
Issued time (seconds)
exp: u64
Expiration time (seconds)
We recommend it be set to iat + 120
. The IronCore server will not use the value,
and it will automatically reject JWTs that are received more than 120 seconds past iat
.
pid: Option<u32>
Project ID
prefixed_pid: Option<u32>
§sid: Option<String>
Segment ID
prefixed_sid: Option<String>
§kid: Option<u32>
Service key ID
prefixed_kid: Option<u32>
§uid: Option<String>
User ID
prefixed_uid: Option<String>
Trait Implementations§
source§impl<'de> Deserialize<'de> for JwtClaims
impl<'de> Deserialize<'de> for JwtClaims
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>,
source§impl PartialEq for JwtClaims
impl PartialEq for JwtClaims
impl Eq for JwtClaims
impl StructuralEq for JwtClaims
impl StructuralPartialEq for JwtClaims
Auto Trait Implementations§
impl RefUnwindSafe for JwtClaims
impl Send for JwtClaims
impl Sync for JwtClaims
impl Unpin 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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.