Commit 63d6863b authored by Solano Morales's avatar Solano Morales
Browse files

ref: renomea variable que define a prioridade do plugin

parent d6882999
......@@ -72,36 +72,55 @@ If you have any suggestion or comments, please feel free to open an issue on thi
## Installation
### Using luarocks
[comment]: <> (### Using luarocks)
```bash
luarocks install kong-plugin-catskillet-jwt-keycloak
```
[comment]: <> (```bash)
### From source
[comment]: <> (luarocks install kong-plugin-catskillet-jwt-keycloak)
#### Packing the rock
[comment]: <> (```)
### From source
```bash
export PLUGIN_VERSION=1.0.0-1
luarocks make
luarocks pack kong-plugin-catskillet-jwt-keycloak ${PLUGIN_VERSION}
```
git clone https://git.catskillet.com/public-plugins/plugins/kong-plugin-catskillet-jwt-keycloak.git
cd kong-plugin-catskillet-jwt-keycloak
#### Installing the rock
luarocks make kong-plugin-catskillet-jwt-keycloak-1.0.0-1.rockspec
```bash
export PLUGIN_VERSION=1.0.0-1
luarocks install catskillet-jwt-keycloak-${PLUGIN_VERSION}.all.rock
```
[comment]: <> (### From source)
[comment]: <> (#### Packing the rock)
[comment]: <> (```bash)
[comment]: <> (export PLUGIN_VERSION=1.0.0-1)
[comment]: <> (luarocks make)
[comment]: <> (luarocks pack kong-plugin-catskillet-jwt-keycloak ${PLUGIN_VERSION})
[comment]: <> (```)
[comment]: <> (#### Installing the rock)
[comment]: <> (```bash)
[comment]: <> (export PLUGIN_VERSION=1.0.0-1)
[comment]: <> (luarocks install catskillet-jwt-keycloak-${PLUGIN_VERSION}.all.rock)
[comment]: <> (```)
### Enabling plugin
Set enabled kong enabled plugins, i.e. with environmental variable: `KONG_PLUGINS="bundled,jwt-keycloak"`
Set enabled kong enabled plugins, i.e. with environmental variable: `KONG_PLUGINS="bundled,catskillet-jwt-keycloak"`
### Changing plugin priority
In some cases you might want to change the execution priority of the plugin. You can do that by setting an environmental variable: `JWT_KEYCLOAK_PRIORITY="900"`
In some cases you might want to change the execution priority of the plugin. You can do that by setting an environmental variable: `CATSKILLET_JWT_KEYCLOAK_PRIORITY="900"`
### Examples
......
......@@ -15,14 +15,14 @@ local re_gmatch = ngx.re.gmatch
local JwtKeycloakHandler = BasePlugin:extend()
local priority_env_var = "JWT_KEYCLOAK_PRIORITY"
local priority_env_var = "CATSKILLET_JWT_KEYCLOAK_PRIORITY"
local priority
if os.getenv(priority_env_var) then
priority = tonumber(os.getenv(priority_env_var))
else
priority = 1005
end
kong.log.debug('JWT_KEYCLOAK_PRIORITY: ' .. priority)
kong.log.debug('CATSKILLET_JWT_KEYCLOAK_PRIORITY: ' .. priority)
JwtKeycloakHandler.PRIORITY = priority
JwtKeycloakHandler.VERSION = "1.1.0"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment