fixed jwt wrapper keys
This commit is contained in:
parent
2d9b07b9ba
commit
0a2f1ab5dd
@ -151,7 +151,7 @@ data ClientData = ClientData
|
|||||||
, userName :: Maybe String
|
, userName :: Maybe String
|
||||||
, clientID :: String
|
, clientID :: String
|
||||||
, clientSecret :: String
|
, clientSecret :: String
|
||||||
, redirect :: String
|
, redirect :: Maybe String
|
||||||
} deriving Show
|
} deriving Show
|
||||||
|
|
||||||
instance FromJSON ClientData where
|
instance FromJSON ClientData where
|
||||||
@ -164,14 +164,14 @@ instance FromJSON ClientData where
|
|||||||
<*> o .:? "username"
|
<*> o .:? "username"
|
||||||
<*> o .: "client_id"
|
<*> o .: "client_id"
|
||||||
<*> o .: "client_secret"
|
<*> o .: "client_secret"
|
||||||
<*> o .: "redirect_url"
|
<*> o .:? "redirect_uri"
|
||||||
where ps = fromString @Key . show
|
where ps = fromString @Key . show
|
||||||
|
|
||||||
data GrantType = PassCreds | AuthCode | Implicit | ClientCreds deriving (Eq)
|
data GrantType = PassCreds | AuthCode | Implicit | ClientCreds deriving (Eq)
|
||||||
|
|
||||||
instance Show GrantType where
|
instance Show GrantType where
|
||||||
show PassCreds = "password"
|
show PassCreds = "password"
|
||||||
show AuthCode = "authorization_code"
|
show AuthCode = "code"
|
||||||
show _ = undefined --TODO support other flows
|
show _ = undefined --TODO support other flows
|
||||||
|
|
||||||
instance FromJSON GrantType where
|
instance FromJSON GrantType where
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user