Commit 39b5a534 authored by Francois Marier's avatar Francois Marier
Browse files

auth/browserid: account for change in format of assertions



Bug 920183

I also replaced the deprecated "getVerifiedEmail()" function with
the new name for it: get()

Change-Id: I1488a17a34d62554967e7907b130ba180d89e40b
Signed-off-by: default avatarFrancois Marier <francois@catalyst.net.nz>
parent 7ec5f30d
......@@ -241,7 +241,7 @@ class PluginAuthBrowserid extends PluginAuth {
<script type="text/javascript">
function browserid_login() {
navigator.id.getVerifiedEmail(function(assertion) {
navigator.id.get(function(assertion) {
if (assertion) {
document.getElementById('browserid-assertion').setAttribute('value', assertion);
document.getElementById('browserid-form').submit();
......
......@@ -28,7 +28,7 @@ safe_require('auth', 'browserid');
define('BROWSERID_VERIFIER_URL', 'https://browserid.org/verify');
$assertion = param_alphanum('assertion', null);
$assertion = param_variable('assertion', null);
if (!$assertion) {
throw new AuthInstanceException(get_string('missingassertion','auth.browserid'));
}
......@@ -37,7 +37,7 @@ if (!$assertion) {
$request = array(
CURLOPT_URL => BROWSERID_VERIFIER_URL,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => 'assertion='.$assertion.'&audience='.get_audience(),
CURLOPT_POSTFIELDS => 'assertion='.urlencode($assertion).'&audience='.get_audience(),
);
$response = mahara_http_request($request);
......
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