Trait aliri::jwt::CoreClaims

source ·
pub trait CoreClaims {
    // Required methods
    fn nbf(&self) -> Option<UnixTime>;
    fn exp(&self) -> Option<UnixTime>;
    fn aud(&self) -> &Audiences;
    fn iss(&self) -> Option<&IssuerRef>;
    fn sub(&self) -> Option<&SubjectRef>;
}
Expand description

Core claims that most compliant and secure JWT tokens should have

Required Methods§

source

fn nbf(&self) -> Option<UnixTime>

Not before

A verifier MUST reject this token before the given time.

source

fn exp(&self) -> Option<UnixTime>

Expires

A verifier MUST reject this token after the given time.

source

fn aud(&self) -> &Audiences

Audience

A verifier MUST reject this token none of the audiences specified is an approved.

source

fn iss(&self) -> Option<&IssuerRef>

Issuer

A verifier MUST reject this token if it the issuer is not approved.

source

fn sub(&self) -> Option<&SubjectRef>

Subject

A verifier SHOULD verify that the subject is acceptable.

Implementors§