From c5293cf603688f946348a1d0e5999529fadd1bed Mon Sep 17 00:00:00 2001 From: Vadym Ovchynnikov Date: Thu, 22 Jun 2023 15:38:06 +0200 Subject: [PATCH 1/2] feat!: Upgrade plugin for Kong 3.x --- README.md | 2 ++ ...c => access-token-introspection-2.0.0-0.rockspec | 4 ++-- kong/plugins/access-token-introspection/handler.lua | 13 +++++-------- 3 files changed, 9 insertions(+), 10 deletions(-) rename access-token-introspection-1.2.1-0.rockspec => access-token-introspection-2.0.0-0.rockspec (94%) diff --git a/README.md b/README.md index fee5179..3de9023 100644 --- a/README.md +++ b/README.md @@ -30,3 +30,5 @@ Plugin is protecting Kong API service/route with introspection of Oauth2.0 JWT a **1.2.0** `luarocks install https://raw.githubusercontent.com/medwing/kong-token-introspection/v1.2.0/access-token-introspection-1.2.0-0.rockspec` **1.2.1** `luarocks install https://raw.githubusercontent.com/medwing/kong-token-introspection/v1.2.1/access-token-introspection-1.2.1-0.rockspec` + +**2.0.0** `luarocks install https://raw.githubusercontent.com/medwing/kong-token-introspection/v2.0.0/access-token-introspection-2.0.0-0.rockspec` diff --git a/access-token-introspection-1.2.1-0.rockspec b/access-token-introspection-2.0.0-0.rockspec similarity index 94% rename from access-token-introspection-1.2.1-0.rockspec rename to access-token-introspection-2.0.0-0.rockspec index 7a5e719..46d7b6c 100644 --- a/access-token-introspection-1.2.1-0.rockspec +++ b/access-token-introspection-2.0.0-0.rockspec @@ -1,9 +1,9 @@ package = "access-token-introspection" -version = "1.2.1-0" +version = "2.0.0-0" source = { url = "git+https://github.com/medwing/kong-token-introspection.git", - tag = "v1.2.1" + tag = "v2.0.0" } description = { diff --git a/kong/plugins/access-token-introspection/handler.lua b/kong/plugins/access-token-introspection/handler.lua index b3baa64..2be499d 100644 --- a/kong/plugins/access-token-introspection/handler.lua +++ b/kong/plugins/access-token-introspection/handler.lua @@ -1,15 +1,12 @@ -local BasePlugin = require "kong.plugins.base_plugin" local access = require "kong.plugins.access-token-introspection.access" -local TokenHandler = BasePlugin:extend() - -function TokenHandler:new() - TokenHandler.super.new(self, "access-token-introspection") -end +local TokenHandler = { + PRIORITY = 1500, + VERSION = "2.0.0-0" +} function TokenHandler:access(conf) - TokenHandler.super.access(self) access.run(conf) end -return TokenHandler \ No newline at end of file +return TokenHandler From 1b903733106b30a5cbd8c1bec062618960d32c10 Mon Sep 17 00:00:00 2001 From: Vadym Ovchynnikov Date: Thu, 22 Jun 2023 16:35:39 +0200 Subject: [PATCH 2/2] ci: Fix --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3e3e92d..75cef3a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,14 +3,14 @@ version: 2.1 jobs: test: machine: - image: ubuntu-2004:202111-01 + image: ubuntu-2004:2023.04.2 docker_layer_caching: true steps: - checkout - run: name: Install pongo command: | - git clone --single-branch https://github.com/Kong/kong-pongo ../kong-pongo + git clone --depth 1 --branch 2.5.0 https://github.com/Kong/kong-pongo ../kong-pongo ../kong-pongo/pongo.sh up ../kong-pongo/pongo.sh build - run: