{-# LANGUAGE TemplateHaskell #-}
module Strive.Types.Authentication
( TokenExchangeResponse (..)
, DeauthorizationResponse (..)
) where
import Data.Aeson.TH (deriveFromJSON)
import Data.Text (Text)
import Strive.Internal.TH (options)
import Strive.Types.Athletes (AthleteSummary)
data TokenExchangeResponse = TokenExchangeResponse
{ tokenExchangeResponse_accessToken :: Text
, tokenExchangeResponse_athlete :: AthleteSummary
} deriving Show
$(deriveFromJSON options ''TokenExchangeResponse)
data DeauthorizationResponse = DeauthorizationResponse
{ deauthorizationResponse_accessToken :: Text
} deriving Show
$(deriveFromJSON options ''DeauthorizationResponse)