Skip to content

Simple project with downlaoder and installation of files required for jwt and simple stitched lua file for performing the auth

License

Notifications You must be signed in to change notification settings

bskjon/resty-jwt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

resty-jwt

Simple project with downlaoder and installation of files required for jwt and simple stitched lua file for performing the auth

How to require JWT


lua_package_path "/usr/local/openresty/nginx/jwt-lua/?.lua;;";
server {
        listen 80;
        listen 443 ssl;
        server_name _;
        ssl_certificate /usr/local/openresty/nginx/conf/tmp_ssl/certs/nginx-selfsigned.crt;
        ssl_certificate_key /usr/local/openresty/nginx/conf/tmp_ssl/private/nginx-selfsigned.key;

        set $uid '';
        location / {
            access_by_lua '
            local jwt = require("resty.nginx-jwt")
            jwt.auth()
        ';
            default_type application/json;
            proxy_set_header uid $uid;
            proxy_pass http://localhost:80;
        }
        location /gate {
            proxy_cache off;
            root   /usr/local/openresty/nginx/html/index.html;
        }

}

About

Simple project with downlaoder and installation of files required for jwt and simple stitched lua file for performing the auth

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published