module OpenID.Connect.TokenResponse
(
TokenResponse(..)
, Words(..)
, toWords
, fromWords
) where
import Data.Text (Text)
import GHC.Generics (Generic)
import OpenID.Connect.JSON
data TokenResponse a = TokenResponse
{ forall a. TokenResponse a -> Text
accessToken :: Text
, forall a. TokenResponse a -> Text
tokenType :: Text
, forall a. TokenResponse a -> Maybe Int
expiresIn :: Maybe Int
, forall a. TokenResponse a -> Maybe Text
refreshToken :: Maybe Text
, forall a. TokenResponse a -> Maybe Words
scope :: Maybe Words
, forall a. TokenResponse a -> a
idToken :: a
, forall a. TokenResponse a -> Maybe Text
atHash :: Maybe Text
}
deriving stock (forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall a x. Rep (TokenResponse a) x -> TokenResponse a
forall a x. TokenResponse a -> Rep (TokenResponse a) x
$cto :: forall a x. Rep (TokenResponse a) x -> TokenResponse a
$cfrom :: forall a x. TokenResponse a -> Rep (TokenResponse a) x
Generic, forall a b. a -> TokenResponse b -> TokenResponse a
forall a b. (a -> b) -> TokenResponse a -> TokenResponse b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: forall a b. a -> TokenResponse b -> TokenResponse a
$c<$ :: forall a b. a -> TokenResponse b -> TokenResponse a
fmap :: forall a b. (a -> b) -> TokenResponse a -> TokenResponse b
$cfmap :: forall a b. (a -> b) -> TokenResponse a -> TokenResponse b
Functor)
deriving via (GenericJSON (TokenResponse Text)) instance ToJSON (TokenResponse Text)
deriving via (GenericJSON (TokenResponse Text)) instance FromJSON (TokenResponse Text)
deriving via (GenericJSON (TokenResponse (Maybe Text))) instance ToJSON (TokenResponse (Maybe Text))
deriving via (GenericJSON (TokenResponse (Maybe Text))) instance FromJSON (TokenResponse (Maybe Text))