From b450ff0413d7186ba18e04fae08f7fe90c0e4fa4 Mon Sep 17 00:00:00 2001 From: wanglei <34475144@qqcom> Date: Mon, 17 Nov 2025 14:40:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=AD=E8=B0=83=E7=94=A8op=E7=AB=AF=E7=82=B9?= =?UTF-8?q?=E6=97=B6=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98=EF=BC=8Coauth?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0login=E6=8E=A5=E5=8F=A3=EF=BC=8C=E7=94=A8?= =?UTF-8?q?=E4=BA=8E=E8=87=AA=E5=B7=B1=E7=9A=84=E7=99=BB=E5=BD=95=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/nginx.conf | 2 +- src/api/oauth/oauth.lua | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index bb52ada..1e93213 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -75,7 +75,7 @@ http { token_endpoint = "http://localhost:9080yum/v1/oauth/v2/token", userinfo_endpoint = "http://localhost:9080yum/v1/oauth/v2/userinfo", --jwks_uri = "http://localhost:9080/jwks", -- 公钥端点(可选) - grant_types_supported = [ "authorization_code", "token", "refresh_token" ], -- 新增支持 refresh_token + grant_types_supported = { "authorization_code", "token", "refresh_token" }, -- 新增支持 refresh_token response_types_supported = { "code" }, subject_types_supported = { "public" }, id_token_signing_alg_values_supported = { "HS256" }, diff --git a/src/api/oauth/oauth.lua b/src/api/oauth/oauth.lua index e61ee90..15b78bd 100644 --- a/src/api/oauth/oauth.lua +++ b/src/api/oauth/oauth.lua @@ -13,6 +13,12 @@ local routes = { -------------------------------------------- ------------ OAuth2.0认证相关路由配置 --------- -------------------------------------------- + --回收token + { + paths = { "/yum/v1/oauth/v2/login" }, + methods = { "GET" }, + handler = oauthService.login, + }, --获取授权码 { paths = { "/yum/v1/oauth/v2/authorize" },