fixed jwt wrapper keys

This commit is contained in:
David Mosbach 2024-01-10 04:52:22 +01:00
parent 2d9b07b9ba
commit 0a2f1ab5dd

View File

@ -151,7 +151,7 @@ data ClientData = ClientData
, userName :: Maybe String
, clientID :: String
, clientSecret :: String
, redirect :: String
, redirect :: Maybe String
} deriving Show
instance FromJSON ClientData where
@ -164,14 +164,14 @@ instance FromJSON ClientData where
<*> o .:? "username"
<*> o .: "client_id"
<*> o .: "client_secret"
<*> o .: "redirect_url"
<*> o .:? "redirect_uri"
where ps = fromString @Key . show
data GrantType = PassCreds | AuthCode | Implicit | ClientCreds deriving (Eq)
instance Show GrantType where
show PassCreds = "password"
show AuthCode = "authorization_code"
show AuthCode = "code"
show _ = undefined --TODO support other flows
instance FromJSON GrantType where