Skip to main content

ALGORITHM

Constant ALGORITHM 

Source
pub const ALGORITHM: &str = "HS256";
Expand description

The only JWT algorithm Ocre signs with and accepts: HS256 (HMAC-SHA256).

Tokens whose header names any other alg, including none, fail decode and decode_with with Error::Unauthorized.

ยงExamples

assert_eq!(ocre::jwt::ALGORITHM, "HS256");