perf(X-Pack): CAS配置

This commit is contained in:
fit2cloud-chenyw 2024-06-28 14:56:42 +08:00
parent f8525ea4ed
commit 5f932e0424

View File

@ -1,4 +1,4 @@
-- --
---- Licensed to the Apache Software Foundation (ASF) under one or more ---- Licensed to the Apache Software Foundation (ASF) under one or more
---- contributor license agreements. See the NOTICE file distributed with ---- contributor license agreements. See the NOTICE file distributed with
---- this work for additional information regarding copyright ownership. ---- this work for additional information regarding copyright ownership.
@ -118,7 +118,7 @@ local function validate(conf, ctx, ticket)
local httpc = http.new() local httpc = http.new()
local res, err = httpc:request_uri(conf.idp_uri .. local res, err = httpc:request_uri(conf.idp_uri ..
"/serviceValidate", "/serviceValidate",
{ query = { ticket = ticket, service = uri_without_ticket(conf, ctx) }, ssl_verify = false }) { query = { ticket = ticket, service = uri_without_ticket(conf, ctx) } ,ssl_verify = false})
if res and res.status == ngx.HTTP_OK and res.body ~= nil then if res and res.status == ngx.HTTP_OK and res.body ~= nil then
if core.string.find(res.body, "<cas:authenticationSuccess>") then if core.string.find(res.body, "<cas:authenticationSuccess>") then