webmcp
diff framework/env/auth/openid/verify.lua @ 223:32ec28229bb5
Finished removing all references to cgi module (except demo-app); Removed partial loading mechanism
author | jbe |
---|---|
date | Fri Feb 27 21:49:00 2015 +0100 (2015-02-27) |
parents | 47ddf0f86009 |
children | b66d446226af |
line diff
1.1 --- a/framework/env/auth/openid/verify.lua Fri Feb 27 17:18:08 2015 +0100 1.2 +++ b/framework/env/auth/openid/verify.lua Fri Feb 27 21:49:00 2015 +0100 1.3 @@ -11,12 +11,12 @@ 1.4 1.5 function auth.openid.verify(args) 1.6 local args = args or {} 1.7 - if cgi.params["openid.ns"] ~= "http://specs.openid.net/auth/2.0" then 1.8 + if request.get_param{name="openid.ns"} ~= "http://specs.openid.net/auth/2.0" then 1.9 return nil, "No indirect OpenID 2.0 message received." 1.10 end 1.11 - local mode = cgi.params["openid.mode"] 1.12 + local mode = request.get_param{name="openid.mode"} 1.13 if mode == "id_res" then 1.14 - local return_to_url = cgi.params["openid.return_to"] 1.15 + local return_to_url = request.get_param{name="openid.return_to"} 1.16 if not return_to_url then 1.17 return nil, "No return_to URL received in answer." 1.18 end 1.19 @@ -28,7 +28,7 @@ 1.20 return nil, "return_to URL not matching." 1.21 end 1.22 local discovery_args = table.new(args) 1.23 - local claimed_identifier = cgi.params["openid.claimed_id"] 1.24 + local claimed_identifier = request.get_param{name="openid.claimed_id"} 1.25 if not claimed_identifier then 1.26 return nil, "No claimed identifier received." 1.27 end 1.28 @@ -53,7 +53,7 @@ 1.29 if dd.claimed_identifier ~= cropped_identifier then 1.30 return nil, "Claimed identifier does not match." 1.31 end 1.32 - local nonce = cgi.params["openid.response_nonce"] 1.33 + local nonce = request.get_param{name="openid.response_nonce"} 1.34 if not nonce then 1.35 return nil, "Did not receive a response nonce." 1.36 end