Moodle Mobile with Additional Features and Shibboleth authentication not working

Moodle Mobile with Additional Features and Shibboleth authentication not working

by Rafal Kowalski -
Number of replies: 5

We've run into a problem related to the Shibboleth authentication for the Moodle Mobile application (in reality, we're building a custom Moodle Mobile app but for the purpose of this discussion it shouldn't be relevant).

The Moodle site is configured to use the Shibboleth authentication for its students.  Following the instructions here: https://docs.moodle.org/28/en/Moodle_Mobile_additional_features we downloaded the "Moodle Mobile additional features" plugin and installed it accordingly to the above instruction.  The installtion "was successful" and we made sure that the option "autologinguests" is disabled.

Now, when we try to add the site to the list of Moodle sites in the Mobile app, we're not redirected to the Shibboleth IdP site and the mobile app console shows the following:

[Log] April 28, 2015 at 5:25:40 PM GMT+2 Core: Checking remote site (console-via-logger.js, line 173)
[Log] April 28, 2015 at 5:25:41 PM GMT+2 Core: Checking site: local_mobile plugin installed (console-via-logger.js, line 173)
[Log] April 28, 2015 at 5:25:41 PM GMT+2 Core: Checking site: Error returned: 3 (console-via-logger.js, line 173)

Indeed a call to check.php on our test Moodle site returns: {"error":1,"code":3}

I've verified in the check.php file from the additional features plugin and the mm.js from the Moodle Mobile app, that the error with code 3 relates to the "extended services not enabled, but the official is enabled."

Could somebody point us to the root of the problem and how to fix it?  Many thanks in advance.

Cheers, 

-rafal

Average of ratings: -
In reply to Rafal Kowalski

Re: Moodle Mobile with Additional Features and Shibboleth authentication not working

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Rafal,

can I have a test user account in your site so I can check what's happening?

Cheers, Juan

Average of ratings: Useful (1)
In reply to Juan Leyva

Re: Moodle Mobile with Additional Features and Shibboleth authentication not working

by Rafal Kowalski -

Hi Juan,

I'd love to but this is a Moodle test server and the access from outside of the university is over the VPN only.  I'll check with my colleague if could do something about it.

Alternatively, is there some tests/verification we could executes on our own and report the results to you? I know it's not ideal but it's very difficult to get access to the VPN without being a student or employee of the university.

Thanks a lot for your prompt reaction and I'm looking forward to solving our issue with your help,

Cheers,

-rafal

In reply to Rafal Kowalski

Re: Moodle Mobile with Additional Features and Shibboleth authentication not working

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

One question, are you trying to connect using your custom app or the official app?

Cheers, Juan

In reply to Juan Leyva

Re: Moodle Mobile with Additional Features and Shibboleth authentication not working

by Rafal Kowalski -
Actually, I've tried both the official app and the custom.  I could only attach the Safari debugger to our custom app but w haven't changed any of the login functionality  yet so we see consistent results from both.  I've also seen the same problem by running the moodlemobile in the moodlemobile-simulator. 


The check.php from the additional features is executing this code:

// Check if the service exists and is enabled.
if (!$DB->record_exists('external_services', array('shortname' => $serviceshortname , 'enabled' => 1))) {
    $response->error = 1;
    // There is at least one mobile service enabled.
    if ($DB->record_exists('external_services', array('shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE , 'enabled' => 1))) {
        $response->code  = 3;
    }
    else {
        $response->code  = 4;
    }
    echo json_encode($response);
    die;
}

setting the 

$response_error = 1;
$response_code = 3;

So it looks to me that the "official_mobile_service" wins because "local_mobile" service is not found or not enabled.  Is this correct?  Why it could be, taken into consideration that the installation of the plugin "was successful"?

Thanks again for your support,

cheers,

-rafal