From 0a2f1ab5dd62eaaabc903d9aca6cfa6e3ac78865 Mon Sep 17 00:00:00 2001 From: David Mosbach Date: Wed, 10 Jan 2024 04:52:22 +0100 Subject: [PATCH] fixed jwt wrapper keys --- src/Server.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Server.hs b/src/Server.hs index 56f7629..5dfa22d 100644 --- a/src/Server.hs +++ b/src/Server.hs @@ -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