@@ -38,7 +38,7 @@ public function create(object $resource, UserInterface $owner, array $context =
38
38
);
39
39
40
40
// create resource_set on OIDC server
41
- $ this ->securityAuthorizationClient ->request ('POST ' , $ this -> getResourceRegistrationEndpoint () , [
41
+ $ this ->securityAuthorizationClient ->request ('POST ' , ' authz/protection/resource_set ' , [
42
42
'auth_bearer ' => $ this ->getPAT (),
43
43
'json ' => [
44
44
'name ' => \sprintf ('%s_%s ' , $ shortName , $ resource ->getId ()->__toString ()),
@@ -66,7 +66,7 @@ public function delete(object $resource, UserInterface $owner, array $context =
66
66
// retrieve corresponding resource_set from OIDC server
67
67
$ response = $ this ->securityAuthorizationClient ->request (
68
68
'GET ' ,
69
- $ this -> getResourceRegistrationEndpoint () ,
69
+ ' authz/protection/resource_set ' ,
70
70
[
71
71
'auth_bearer ' => $ this ->getPAT (),
72
72
'query ' => [
@@ -85,7 +85,7 @@ public function delete(object $resource, UserInterface $owner, array $context =
85
85
// delete corresponding resource_set on OIDC server
86
86
$ this ->securityAuthorizationClient ->request (
87
87
'DELETE ' ,
88
- \sprintf ('%s/%s ' , $ this -> getResourceRegistrationEndpoint () , $ resourceSet ['_id ' ]),
88
+ \sprintf ('%s/%s ' , ' authz/protection/resource_set ' , $ resourceSet ['_id ' ]),
89
89
[
90
90
'auth_bearer ' => $ this ->getPAT (),
91
91
]
@@ -97,7 +97,7 @@ public function delete(object $resource, UserInterface $owner, array $context =
97
97
*/
98
98
private function getPAT (): string
99
99
{
100
- $ response = $ this ->securityAuthorizationClient ->request ('POST ' , $ this -> getTokenEndpoint () , [
100
+ $ response = $ this ->securityAuthorizationClient ->request ('POST ' , ' protocol/openid-connect/token ' , [
101
101
'body ' => [
102
102
'grant_type ' => 'client_credentials ' ,
103
103
'client_id ' => $ this ->oidcClientId ,
@@ -108,20 +108,4 @@ private function getPAT(): string
108
108
109
109
return $ content ['access_token ' ];
110
110
}
111
-
112
- private function getTokenEndpoint (): string
113
- {
114
- $ response = $ this ->securityAuthorizationClient ->request ('GET ' , '.well-known/openid-configuration ' );
115
- $ content = $ response ->toArray ();
116
-
117
- return $ content ['token_endpoint ' ];
118
- }
119
-
120
- private function getResourceRegistrationEndpoint (): string
121
- {
122
- $ response = $ this ->securityAuthorizationClient ->request ('GET ' , '.well-known/uma2-configuration ' );
123
- $ content = $ response ->toArray ();
124
-
125
- return $ content ['resource_registration_endpoint ' ];
126
- }
127
111
}
0 commit comments