Commit cc45179d authored by Morten Knutsen's avatar Morten Knutsen

Add idp arg, include namespace in uri and encode query params.

parent 7d4d023f
......@@ -3,5 +3,9 @@ if not returnTo then
returnTo = ngx.var.scheme .. '://' .. ngx.var.host .. '/'
end
local authServer = os.getenv('auth_server')
local idp = os.getenv('idp')
local namespace = os.getenv('namespace')
local action = ngx.var.action
ngx.redirect('https://' .. authServer .. '/sp/' .. action .. '/?ReturnTo=' .. returnTo)
local params = ngx.encode_args({'ReturnTo' = returnTo, 'Idp' = idp})
ngx.redirect('https://' .. authServer .. '/' .. namespace .. '/' .. action .. '?' .. params)
......@@ -7,6 +7,7 @@ env memcache;
env feide_mode;
env auth_server;
env upstream_port;
env idp;
events {
worker_connections 768;
......
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