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
sourceimpl<'de> Deserialize<'de> for JwtClaims
impl<'de> Deserialize<'de> for JwtClaims
sourcefn 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
sourceimpl PartialEq<JwtClaims> for JwtClaims
impl PartialEq<JwtClaims> 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more