A simple SSO for NGINX, written in Lua
Find a file
2013-10-15 14:08:59 +02:00
access.lua Bugfixes 2013-10-15 13:58:16 +02:00
conf.json Rename cache.json 2013-10-15 14:08:59 +02:00
init.lua Bugfixes 2013-10-15 13:58:16 +02:00
login.html Init 2013-10-15 10:11:39 +02:00
README.md Update README.md 2013-10-15 14:05:46 +02:00

SSOwat

A simple SSO for nginx, written in Lua

Requirements

Nginx "Openresty" flavored : http://openresty.org/ or nginx-extras in Debian wheezy-backports

Example Nginx conf


lua_package_path "/usr/share/lua/5.1/nginx/?.lua;;"; # For Debian
init_by_lua 'conf_path = "path/to/conf.json"';
init_by_lua_file path/to/init.lua;
access_by_lua_file path/to/access.lua;

# SSO domain
server {
    listen 80;
    server_name  mydomain.com;

    location = /ssowat/ {
       root /var/www/portal;
       index  login.html;
       add_header Content-Type text/html;
    }

    location = /whatever/ {

        ...

}

# Other domain
server {
    listen 80;
    server_name myotherdomain.com;

    ...

}