Module

Node.Simple.Jwt

Package
purescript-simple-jwt
Repository
oreshinya/purescript-simple-jwt

#Secret Source

type Secret = String

#Jwt Source

newtype Jwt

The type of JSON Web Token.

Constructors

Instances

#Algorithm Source

data Algorithm

Supported algorithms.

Constructors

Instances

#decode Source

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

Decode JWT with signature verification.

#encode Source

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

Encode to JWT.