liquid_feedback_frontend
diff app/main/openid/_action/initiate.lua @ 51:0849be391140
Public read access; Read-only API for initiatives; Prepared integration of OpenID
author | bsw |
---|---|
date | Sun Apr 04 22:05:11 2010 +0200 (2010-04-04) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/app/main/openid/_action/initiate.lua Sun Apr 04 22:05:11 2010 +0200 1.3 @@ -0,0 +1,20 @@ 1.4 +local user_supplied_identifier = param.get("openid_identifier") 1.5 + 1.6 +if not config.auth_openid_identifier_check_func(user_supplied_identifier) then 1.7 + slot.put_into("error", _"This identifier is not allowed for this instance.") 1.8 + return 1.9 +end 1.10 + 1.11 +local success,errmsg = auth.openid.initiate{ 1.12 + user_supplied_identifier = user_supplied_identifier, 1.13 + https_as_default = config.auth_openid_https_as_default, 1.14 + curl_options = config.auth_openid_curl_options, 1.15 + realm = request.get_absolute_baseurl(), 1.16 + return_to_module = "openid", 1.17 + return_to_view = "verify" 1.18 +} 1.19 + 1.20 +if not success then 1.21 + slot.put_into("error", encode.html(_("Error while resolving openid. Internal message: '#{errmsg}'", { errmsg = errmsg }))) 1.22 + return false 1.23 +end 1.24 \ No newline at end of file