Module

Node.Simple.Jwt

#Secret

type Secret = String

#Jwt

newtype Jwt

The type of JSON Web Token.

Instances

#Algorithm

data Algorithm

Supported algorithms.

Constructors

Instances

#fromString

fromString :: String -> Jwt

Convert a String to a Jwt.

#toString

toString :: Jwt -> String

Convert a Jwt to a String.

#decode

decode :: forall payload. ReadForeign payload => Secret -> Jwt -> Effect (Either JwtError payload)

Decode JWT with signature verification.

#encode

encode :: forall payload. WriteForeign payload => Secret -> Algorithm -> payload -> Effect Jwt

Encode to JWT.

Modules