Skip to content

Commit

Permalink
Fixes the body filter and signout after merging #4
Browse files Browse the repository at this point in the history
  • Loading branch information
awestendorf committed Mar 20, 2015
1 parent 3c34b27 commit 13885d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion access.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ end

-- See https://developers.google.com/accounts/docs/OAuth2WebServer
if uri == signout_uri then
ngx.header["Set-Cookie"] = "AccessToken=deleted; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT"
ngx.header["Set-Cookie"] = "OauthAccessToken==deleted; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT"
return ngx.redirect(cb_scheme.."://"..server_name)
end

Expand Down
8 changes: 4 additions & 4 deletions body_filter.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

-- Will filter the output and put in a header implying login
if ngx.var.cookie_AccessToken then
if ngx.var.cookie_OauthAccessToken then
local signout_uri = ngx.var.ngo_signout_uri or "/_signout"

local img = "<img src=\""..ngx.unescape_uri(ngx.var.cookie_Picture).."\" />"
local user = "<span class=\"ngo_user\">"..ngx.unescape_uri(ngx.var.cookie_Name).."</span>"
local email = "<span class=\"ngo_email\">"..ngx.unescape_uri(ngx.var.cookie_Email).."</span>"
local img = "<img src=\""..ngx.unescape_uri(ngx.var.cookie_OauthPicture).."\" />"
local user = "<span class=\"ngo_user\">"..ngx.unescape_uri(ngx.var.cookie_OauthName).."</span>"
local email = "<span class=\"ngo_email\">"..ngx.unescape_uri(ngx.var.cookie_OauthEmail).."</span>"
local signout = "<a href=\""..signout_uri.."\">Signout</a>"
local div = "<div class=\"ngo_auth\">"..img..user..email..signout.."</div>"

Expand Down

0 comments on commit 13885d4

Please sign in to comment.