Skip to main content

Crate stano_security

Crate stano_security 

Source
Expand description

JWT encode/decode (ES256) and a generic SecurityContext<E> for auth.

Structs§

Claims
JWT payload, generic over an app-defined extension type E for custom claims.
JwtConfig
ES256 EC key material and expiration used by encode_jwt/decode_jwt.
SecurityContext
Wraps validated JWT Claims for use in request handlers/extractors.

Enums§

JwtError
Errors returned by encode_jwt/decode_jwt.

Functions§

decode_jwt
Decode and verify a JWT token, returning the Claims.
encode_jwt
Encode a Claims struct into a JWT token.