Skip to content

Commit

Permalink
yep
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Theel committed Oct 18, 2023
1 parent 2e60845 commit 40611b1
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
4 changes: 3 additions & 1 deletion client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2216,11 +2216,13 @@ func Test_CreateListGetUpdateDeleteClient(t *testing.T) {

func Test_CreateListGetUpdateDeleteClientRepresentation(t *testing.T) {
t.Parallel()

cfg := GetConfig(t)
client := NewClientWithDebug(t)
token := GetClientToken(t, client)
testClient := gocloak.Client{
ClientID: GetRandomNameP("gocloak-client-secret-client-id-"),
ClientID: GetRandomNameP("gocloak-client-secret-client-id-"),
DefaultClientScopes: &[]string{},
}

ctx := context.Background()
Expand Down
42 changes: 41 additions & 1 deletion testdata/gocloak-realm.json
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,47 @@
"phone",
"offline_access",
"microprofile-jwt"
]
],
"authorizationSettings": {
"allowRemoteResourceManagement": true,
"policyEnforcementMode": "ENFORCING",
"resources": [
{
"name": "Default Resource",
"type": "urn:gocloak:resources:default",
"ownerManagedAccess": false,
"attributes": {},
"_id": "067438bb-1d4a-4c4d-b84f-a57344ef2b2b",
"uris": [
"/*"
]
}
],
"policies": [
{
"id": "16fdc33a-7384-4735-8b7e-5d15b8e8bdaf",
"name": "Default Policy",
"description": "A policy that grants access only for users within this realm",
"type": "js",
"logic": "POSITIVE",
"decisionStrategy": "AFFIRMATIVE"
},
{
"id": "30cfeba8-79c4-493b-97c7-9e8c6e7c62c9",
"name": "Default Permission",
"description": "A permission that applies to the default resource type",
"type": "resource",
"logic": "POSITIVE",
"decisionStrategy": "UNANIMOUS",
"config": {
"defaultResourceType": "urn:gocloak:resources:default",
"applyPolicies": "[\"Default Policy\"]"
}
}
],
"scopes": [],
"decisionStrategy": "UNANIMOUS"
}
},
{
"id": "db4d47d3-31cd-49c7-a1c7-351e13da7907",
Expand Down

0 comments on commit 40611b1

Please sign in to comment.