pub enum Algorithm {
Rs256,
Es256,
Hs256,
}Expand description
JWT signing algorithm.
The variant determines both the JWT alg header value and the expected
format of the key data passed to JwtSigner::new.
Variants§
Rs256
RSASSA-PKCS1-v1_5 with SHA-256 (RS256).
Key data: PKCS#8 PEM (-----BEGIN PRIVATE KEY-----). Typical RSA
modulus size is 2048 bits. Used by GitHub App, Google Cloud service
accounts, and most server-to-server JWT flows.
Es256
ECDSA on curve P-256 with SHA-256 (ES256).
Key data: PKCS#8 PEM. Used by Apple (Sign in with Apple, APNs Provider API) and other services that prefer compact signatures.
Hs256
HMAC with SHA-256 (HS256).
Key data: raw shared-secret bytes. Used for symmetric authentication schemes such as custom gateways and Supabase.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Algorithm
impl RefUnwindSafe for Algorithm
impl Send for Algorithm
impl Sync for Algorithm
impl Unpin for Algorithm
impl UnsafeUnpin for Algorithm
impl UnwindSafe for Algorithm
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
Mutably borrows from an owned value. Read more