Safe Haskell | None |
---|---|
Language | Haskell2010 |
Algorithms used to sign and validate JWT signatures
Synopsis
- data Algorithm k where
- HMAC256 :: Secret -> Algorithm Secret
- HMAC384 :: Secret -> Algorithm Secret
- HMAC512 :: Secret -> Algorithm Secret
- RSA256 :: RsaKey r => r -> Algorithm r
- RSA384 :: RsaKey r => r -> Algorithm r
- RSA512 :: RsaKey r => r -> Algorithm r
- ECDSA256 :: EcKey e => e -> Algorithm e
- ECDSA384 :: EcKey e => e -> Algorithm e
- ECDSA512 :: EcKey e => e -> Algorithm e
- AlgNone :: Algorithm ()
- type family RsaKey t :: Constraint where ...
- type family EcKey t :: Constraint where ...
- toHeaderAlg :: Algorithm k -> Alg
- jwtAlgWithKey :: Algorithm k -> (JwtAlgT, k)
Documentation
data Algorithm k where Source #
Cryptographic algorithm used to secure the JWT
HMAC256 :: Secret -> Algorithm Secret | HMAC SHA-256 (secret key must be at least 256 bits in size) |
HMAC384 :: Secret -> Algorithm Secret | HMAC SHA-384 (secret key must be at least 384 bits in size) |
HMAC512 :: Secret -> Algorithm Secret | HMAC SHA-512 (secret key must be at least 512 bits in size) |
RSA256 :: RsaKey r => r -> Algorithm r | RSASSA-PKCS1-v1_5 SHA-256 (a key of size 2048 bits or larger must be used with this algorithm) |
RSA384 :: RsaKey r => r -> Algorithm r | RSASSA-PKCS1-v1_5 SHA-384 (a key of size 2048 bits or larger must be used with this algorithm) |
RSA512 :: RsaKey r => r -> Algorithm r | RSASSA-PKCS1-v1_5 SHA-512 (a key of size 2048 bits or larger must be used with this algorithm) |
ECDSA256 :: EcKey e => e -> Algorithm e | ECDSA with P-256 curve and SHA-256 |
ECDSA384 :: EcKey e => e -> Algorithm e | ECDSA with P-384 curve and SHA-384 |
ECDSA512 :: EcKey e => e -> Algorithm e | ECDSA with P-521 curve and SHA-512 |
AlgNone :: Algorithm () | None |
type family RsaKey t :: Constraint where ... Source #
type family EcKey t :: Constraint where ... Source #
toHeaderAlg :: Algorithm k -> Alg Source #
jwtAlgWithKey :: Algorithm k -> (JwtAlgT, k) Source #