{-| Module: BattlePlace.Token.Types Description: Token types. License: MIT -} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module BattlePlace.Token.Types ( InternalToken(..) , Ticket(..) ) where import qualified Data.Aeson as J import qualified Data.Text as T import Servant.API -- | Internal token. -- Token is encrypted, and contains some internal information. newtype InternalToken a = InternalToken T.Text deriving (J.FromJSON, J.ToJSON, FromHttpApiData, ToHttpApiData) -- | Ticket. -- Ticket doesn't contain information, it's just an ID. newtype Ticket = Ticket T.Text deriving (J.FromJSON, J.ToJSON)