@@ -31,7 +31,7 @@ __DATA__
31
31
local plugin = require (" apisix.plugins.authz-keycloak" )
32
32
local ok , err = plugin. check_schema({
33
33
client_id = " foo" ,
34
- token_endpoint = " https://host.domain/auth/ realms/foo/protocol/openid-connect/token"
34
+ token_endpoint = " https://host.domain/realms/foo/protocol/openid-connect/token"
35
35
})
36
36
if not ok then
37
37
ngx. say (err)
54
54
local plugin = require (" apisix.plugins.authz-keycloak" )
55
55
local ok , err = plugin. check_schema({
56
56
client_id = " foo" ,
57
- discovery = " https://host.domain/auth/ realms/foo/.well-known/uma2-configuration"
57
+ discovery = " https://host.domain/realms/foo/.well-known/uma2-configuration"
58
58
})
59
59
if not ok then
60
60
ngx. say (err)
78
78
local ok , err = plugin. check_schema({
79
79
client_id = " foo" ,
80
80
lazy_load_paths = true,
81
- token_endpoint = " https://host.domain/auth/ realms/foo/protocol/openid-connect/token" ,
82
- resource_registration_endpoint = " https://host.domain/auth/ realms/foo/authz/protection/resource_set"
81
+ token_endpoint = " https://host.domain/realms/foo/protocol/openid-connect/token" ,
82
+ resource_registration_endpoint = " https://host.domain/realms/foo/authz/protection/resource_set"
83
83
})
84
84
if not ok then
85
85
ngx. say (err)
103
103
local ok , err = plugin. check_schema({
104
104
client_id = " foo" ,
105
105
lazy_load_paths = true,
106
- discovery = " https://host.domain/auth/ realms/foo/.well-known/uma2-configuration"
106
+ discovery = " https://host.domain/realms/foo/.well-known/uma2-configuration"
107
107
})
108
108
if not ok then
109
109
ngx. say (err)
125
125
content_by_lua_block {
126
126
local plugin = require (" apisix.plugins.authz-keycloak" )
127
127
local ok , err = plugin. check_schema({
128
- discovery = " https://host.domain/auth/ realms/foo/.well-known/uma2-configuration" ,
129
- token_endpoint = " https://host.domain/auth/ realms/foo/protocol/openid-connect/token" ,
130
- resource_registration_endpoint = " https://host.domain/auth/ realms/foo/authz/protection/resource_set" ,
128
+ discovery = " https://host.domain/realms/foo/.well-known/uma2-configuration" ,
129
+ token_endpoint = " https://host.domain/realms/foo/protocol/openid-connect/token" ,
130
+ resource_registration_endpoint = " https://host.domain/realms/foo/authz/protection/resource_set" ,
131
131
client_id = " University" ,
132
132
client_secret = " secret" ,
133
133
grant_type = " urn:ietf:params:oauth:grant-type:uma-ticket" ,
187
187
location / t {
188
188
content_by_lua_block {
189
189
local plugin = require (" apisix.plugins.authz-keycloak" )
190
- local ok , err = plugin. check_schema({discovery = " https://host.domain/auth/ realms/foo/.well-known/uma2-configuration" })
190
+ local ok , err = plugin. check_schema({discovery = " https://host.domain/realms/foo/.well-known/uma2-configuration" })
191
191
if not ok then
192
192
ngx. say (err)
193
193
end
210
210
local plugin = require (" apisix.plugins.authz-keycloak" )
211
211
local ok , err = plugin. check_schema({
212
212
client_id = " foo" ,
213
- token_endpoint = " https://host.domain/auth/ realms/foo/protocol/openid-connect/token" ,
213
+ token_endpoint = " https://host.domain/realms/foo/protocol/openid-connect/token" ,
214
214
lazy_load_paths = true
215
215
})
216
216
if not ok then
238
238
[[{
239
239
" plugins" : {
240
240
" authz-keycloak" : {
241
- " token_endpoint" : " https://127.0.0.1:8443/auth/ realms/University/protocol/openid-connect/token" ,
241
+ " token_endpoint" : " https://127.0.0.1:8443/realms/University/protocol/openid-connect/token" ,
242
242
" permissions" : [" course_resource#delete" ],
243
243
" client_id" : " course_management" ,
244
244
" grant_type" : " urn:ietf:params:oauth:grant-type:uma-ticket" ,
@@ -296,7 +296,7 @@ GET /t
296
296
-- - response_body
297
297
false
298
298
-- - error_log
299
- Error while sending authz request to https: // 127.0 . 0. 1: 8443 / auth / realms/ University/ protocol/ openid-connect/ token: 18
299
+ Error while sending authz request to https: // 127.0 . 0. 1: 8443 / realms/ University/ protocol/ openid-connect/ token: 18
300
300
-- - error_code: 503
301
301
302
302
@@ -311,7 +311,7 @@ Error while sending authz request to https://127.0.0.1:8443/auth/realms/Universi
311
311
[[{
312
312
" plugins" : {
313
313
" authz-keycloak" : {
314
- " token_endpoint" : " https://127.0.0.1:8443/auth/ realms/University/protocol/openid-connect/token" ,
314
+ " token_endpoint" : " https://127.0.0.1:8443/realms/University/protocol/openid-connect/token" ,
315
315
" permissions" : [" course_resource#delete" ],
316
316
" client_id" : " course_management" ,
317
317
" grant_type" : " urn:ietf:params:oauth:grant-type:uma-ticket" ,
@@ -382,7 +382,7 @@ Request denied: HTTP 401 Unauthorized. Body: {"error":"HTTP 401 Unauthorized"}
382
382
[[{
383
383
" plugins" : {
384
384
" authz-keycloak" : {
385
- " token_endpoint" : " http://127.0.0.1:8443/auth/ realms/University/protocol/openid-connect/token" ,
385
+ " token_endpoint" : " http://127.0.0.1:8443/realms/University/protocol/openid-connect/token" ,
386
386
" client_id" : " course_management" ,
387
387
" grant_type" : " urn:ietf:params:oauth:grant-type:uma-ticket" ,
388
388
" policy_enforcement_mode" : " ENFORCING" ,
@@ -447,7 +447,7 @@ GET /t
447
447
[[{
448
448
" plugins" : {
449
449
" authz-keycloak" : {
450
- " token_endpoint" : " http://127.0.0.1:8443/auth/ realms/University/protocol/openid-connect/token" ,
450
+ " token_endpoint" : " http://127.0.0.1:8443/realms/University/protocol/openid-connect/token" ,
451
451
" client_id" : " course_management" ,
452
452
" grant_type" : " urn:ietf:params:oauth:grant-type:uma-ticket" ,
453
453
" policy_enforcement_mode" : " ENFORCING" ,
@@ -515,7 +515,7 @@ Location: http://127.0.0.1/test
515
515
[[{
516
516
" plugins" : {
517
517
" authz-keycloak" : {
518
- " token_endpoint" : " https://127.0.0.1:8443/auth/ realms/University/protocol/openid-connect/token" ,
518
+ " token_endpoint" : " https://127.0.0.1:8443/realms/University/protocol/openid-connect/token" ,
519
519
" permissions" : [" course_resource#view" ],
520
520
" client_id" : " course_management" ,
521
521
" client_secret" : " d1ec69e9-55d2-4109-a3ea-befa071579d5" ,
587
587
[[{
588
588
" plugins" : {
589
589
" authz-keycloak" : {
590
- " token_endpoint" : " https://127.0.0.1:8443/auth/ realms/University/protocol/openid-connect/token" ,
590
+ " token_endpoint" : " https://127.0.0.1:8443/realms/University/protocol/openid-connect/token" ,
591
591
" permissions" : [" course_resource#view" ],
592
592
" client_id" : " course_management" ,
593
593
" client_secret" : " d1ec69e9-55d2-4109-a3ea-befa071579d5" ,
0 commit comments