File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,11 @@ createScimUserGroup domain token scimUserGroup = do
9797 body <- make scimUserGroup
9898 submit " POST" $ req & addJSON body . addHeader " Authorization" (" Bearer " <> token)
9999
100+ getScimUserGroup :: (HasCallStack , MakesValue domain ) => domain -> String -> String -> App Response
101+ getScimUserGroup domain token gid = do
102+ req <- baseRequest domain Spar Versioned $ joinHttpPath [ " /scim/v2/Groups" , gid ]
103+ submit " GET" $ req & addHeader " Authorization" (" Bearer " <> token)
104+
100105-- | https://staging-nginz-https.zinfra.io/v12/api/swagger-ui/#/default/idp-create
101106createIdp :: (HasCallStack , MakesValue user ) => user -> SAML. IdPMetadata -> App Response
102107createIdp user metadata = do
Original file line number Diff line number Diff line change @@ -365,8 +365,8 @@ testSparCreateScimTokenWithName = do
365365----------------------------------------------------------------------
366366-- scim group stuff
367367
368- testSparScimCreateUserGroup :: (HasCallStack ) => App ()
369- testSparScimCreateUserGroup = do
368+ testSparScimCreateGetUserGroup :: (HasCallStack ) => App ()
369+ testSparScimCreateGetUserGroup = do
370370 (owner, _, _) <- createTeam OwnDomain 1
371371 tok <- createScimTokenV6 owner def >>= \ resp -> resp. json %. " token" >>= asString
372372 let scimUserGroup =
@@ -384,7 +384,11 @@ testSparScimCreateUserGroup = do
384384 resp <- createScimUserGroup OwnDomain tok scimUserGroup
385385 assertSuccess resp
386386
387- -- get group here via resp
387+ gid <- resp. json %. " qualified_id.id" & asString
388+
389+ resp2 <- getScimUserGroup OwnDomain tok gid
390+
391+ liftIO $ print (resp, resp2)
388392
389393----------------------------------------------------------------------
390394-- saml stuff
You can’t perform that action at this time.
0 commit comments