From b2c74d170793ecb0f49c4d78040b8b52c2a37582 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Fri, 28 Jun 2024 13:09:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DCAS=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E4=BD=BF=E7=94=A8https=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- de-xpack | 2 +- .../dataease/apisix/plugins/cas-auth.lua | 15 +++++++---- .../api/permissions/user/bo/PlatformUser.java | 26 +++++++++++++++++++ 3 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/bo/PlatformUser.java diff --git a/de-xpack b/de-xpack index 4999fda628..c0417533a3 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit 4999fda62894ac30bb03dd651bd96a4216d0792c +Subproject commit c0417533a3fe5c2efbf3fa673b9f09fbf9437e74 diff --git a/installer/dataease/apisix/plugins/cas-auth.lua b/installer/dataease/apisix/plugins/cas-auth.lua index a0711e356b..9f73a33890 100644 --- a/installer/dataease/apisix/plugins/cas-auth.lua +++ b/installer/dataease/apisix/plugins/cas-auth.lua @@ -1,4 +1,4 @@ --- +-- ---- Licensed to the Apache Software Foundation (ASF) under one or more ---- contributor license agreements. See the NOTICE file distributed with ---- this work for additional information regarding copyright ownership. @@ -34,6 +34,7 @@ local schema = { idp_uri = {type = "string"}, cas_callback_uri = {type = "string"}, logout_uri = {type = "string"}, + cas_callback_domain={type="string"} }, required = { "idp_uri", "cas_callback_uri", "logout_uri" @@ -52,8 +53,12 @@ function _M.check_schema(conf) end local function uri_without_ticket(conf, ctx) - return ctx.var.scheme .. "://" .. ctx.var.host .. ":" .. - ctx.var.server_port .. conf.cas_callback_uri + if conf.cas_callback_domain == nil then + return ctx.var.scheme .. "://" .. ctx.var.host .. ":" .. + ctx.var.server_port .. conf.cas_callback_uri + else + return conf.cas_callback_domain .. conf.cas_callback_uri + end end local function get_session_id(ctx) @@ -113,7 +118,7 @@ local function validate(conf, ctx, ticket) local httpc = http.new() local res, err = httpc:request_uri(conf.idp_uri .. "/serviceValidate", - { query = { ticket = ticket, service = uri_without_ticket(conf, ctx) } }) + { 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 core.string.find(res.body, "") then @@ -196,4 +201,4 @@ function _M.access(conf, ctx) end end -return _M \ No newline at end of file +return _M diff --git a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/bo/PlatformUser.java b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/bo/PlatformUser.java new file mode 100644 index 0000000000..ce89bab441 --- /dev/null +++ b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/bo/PlatformUser.java @@ -0,0 +1,26 @@ +package io.dataease.api.permissions.user.bo; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serial; +import java.io.Serializable; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class PlatformUser implements Serializable { + @Serial + private static final long serialVersionUID = 2749044307502902368L; + + private String account; + + private String name; + + private String email; + + private String phone; + + private Integer type; +}