Fix handling Keycloak users without family/given name set
This commit is contained in:
parent
e819617c38
commit
dcd30b6ccd
@ -21,8 +21,8 @@ data JwtAuthInfo = JwtAuthInfo {
|
|||||||
instance FromJSON JwtAuthInfo where
|
instance FromJSON JwtAuthInfo where
|
||||||
parseJSON (Object v) =
|
parseJSON (Object v) =
|
||||||
JwtAuthInfo <$> v .: "preferred_username"
|
JwtAuthInfo <$> v .: "preferred_username"
|
||||||
<*> v .: "family_name"
|
<*> v .:? "family_name"
|
||||||
<*> v .: "given_name"
|
<*> v .:? "given_name"
|
||||||
parseJSON _ = mzero
|
parseJSON _ = mzero
|
||||||
|
|
||||||
jwtAuthInfoIdent :: JwtAuthInfo -> Text
|
jwtAuthInfoIdent :: JwtAuthInfo -> Text
|
||||||
|
Loading…
Reference in New Issue
Block a user