paseto-0.1.0.0: Platform-Agnostic Security Tokens
Safe HaskellSafe-Inferred
LanguageHaskell2010

Crypto.Paseto.Token

Synopsis

Documentation

newtype Footer Source #

Footer consisting of unencrypted free-form data.

The footer's contents may be JSON or some other structured data, but it doesn't have to be.

When a PASETO token is constructed, the footer is authenticated, but not encrypted (i.e. its integrity is protected, but it is not made confidential). In authenticated encryption schemes, this is referred to as "associated data".

Note that this type's Eq instance performs a constant-time equality check.

Constructors

Footer 

Fields

Instances

Instances details
Show Footer Source # 
Instance details

Defined in Crypto.Paseto.Token

Eq Footer Source # 
Instance details

Defined in Crypto.Paseto.Token

Methods

(==) :: Footer -> Footer -> Bool #

(/=) :: Footer -> Footer -> Bool #

newtype ImplicitAssertion Source #

Unencrypted authenticated data which is not stored in the PASETO token.

When a PASETO token is constructed, the implicit assertion is authenticated, but it is not stored in the token. This is useful if one wants to associate some data that should remain confidential.

Note that this type's Eq instance performs a constant-time equality check.

newtype Payload Source #

Raw PASETO token payload.

Note that this type's Eq instance performs a constant-time equality check.

Constructors

Payload 

Instances

Instances details
Show Payload Source # 
Instance details

Defined in Crypto.Paseto.Token

Eq Payload Source # 
Instance details

Defined in Crypto.Paseto.Token

Methods

(==) :: Payload -> Payload -> Bool #

(/=) :: Payload -> Payload -> Bool #

data Token v p where Source #

PASETO token parameterized by its protocol Version and Purpose.

Constructors

TokenV3Local

PASETO version 3 local token.

Fields

TokenV3Public

PASETO version 3 public token.

Fields

TokenV4Local

PASETO version 4 local token.

Fields

TokenV4Public

PASETO version 4 public token.

Fields

Instances

Instances details
Show (Token v p) Source # 
Instance details

Defined in Crypto.Paseto.Token

Methods

showsPrec :: Int -> Token v p -> ShowS #

show :: Token v p -> String #

showList :: [Token v p] -> ShowS #

Eq (Token v p) Source # 
Instance details

Defined in Crypto.Paseto.Token

Methods

(==) :: Token v p -> Token v p -> Bool #

(/=) :: Token v p -> Token v p -> Bool #

data SomeToken Source #

Some kind of PASETO token.

Instances

Instances details
Show SomeToken Source # 
Instance details

Defined in Crypto.Paseto.Token

Eq SomeToken Source # 
Instance details

Defined in Crypto.Paseto.Token

toSomeToken :: Token v p -> SomeToken Source #

Convert a Token to a SomeToken.