Skip to content

Commit

Permalink
Merge pull request #10 from medwing/feat_Upgrade_plugin_for_Kong_3.x
Browse files Browse the repository at this point in the history
feat!: Upgrade plugin for Kong 3.x
  • Loading branch information
vovchynniko authored Jun 22, 2023
2 parents c6c2432 + 1b90373 commit 79b265f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
13 changes: 5 additions & 8 deletions kong/plugins/access-token-introspection/handler.lua
Original file line number Diff line number Diff line change
@@ -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
return TokenHandler

0 comments on commit 79b265f

Please sign in to comment.