Struct mz_frontegg_auth::auth::Claims
source · pub struct Claims {
pub sub: Uuid,
pub exp: i64,
pub iss: String,
pub token_type: ClaimTokenType,
pub email: Option<String>,
pub user_id: Option<Uuid>,
pub tenant_id: Uuid,
pub roles: Vec<String>,
pub permissions: Vec<String>,
pub metadata: Option<ClaimMetadata>,
}
Expand description
The raw claims encoded in a Frontegg access token.
Consult the JSON Web Token specification and the Frontegg documentation to determine the precise semantics of these fields.
Fields§
§sub: Uuid
The “subject” of the token.
For tokens of type UserToken
, this is the ID of the Frontegg user
itself. For tokens of type UserApiToken
and TenantApiToken
, this
is the client ID of the API token.
exp: i64
The time at which the claims expire, represented in seconds since the Unix epoch.
iss: String
The “issuer” of the token.
This is always the domain associated with the Frontegg workspace.
token_type: ClaimTokenType
The type of API token.
email: Option<String>
For tokens of type UserToken
and UserApiToken
, the email address
of the authenticated user.
user_id: Option<Uuid>
For tokens of type UserApiToken
, the ID of the authenticated user.
tenant_id: Uuid
The ID of the authenticated tenant.
roles: Vec<String>
The IDs of the roles granted by the token.
permissions: Vec<String>
The IDs of the permissions granted by the token.
metadata: Option<ClaimMetadata>
Metadata embedded in the JWT.
Implementations§
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>,
Auto Trait Implementations§
impl Freeze for Claims
impl RefUnwindSafe for Claims
impl Send for Claims
impl Sync for Claims
impl Unpin 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<T, U> OverrideFrom<Option<&T>> for Uwhere
U: OverrideFrom<T>,
impl<T, U> OverrideFrom<Option<&T>> for Uwhere
U: OverrideFrom<T>,
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ProgressEventTimestamp for T
impl<T> ProgressEventTimestamp for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.source§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
std::ops::AddAssign
, for types that do not implement AddAssign
.