Open VFXpro opened 3 years ago
I'm not sure if this is tied to Moodle 3.11 as I don't have access to an older version of Moodle.
It looks like I might not be providing the correct token URL... I reached to Classlink to figure out where is this token can be found.
I am having a similar issue. I know the token URL I'm using (/datahub/oauth/token) is correct because it works through Postman.
UPDATE
I did a little debugging and, in my case, the issue is with the url-encoding here:
oauth2_client.php:128
$idsecret = base64_encode(urlencode($this->clientid) . ':' . urlencode($this->clientsecret));
The issue is fixed if I remove the url-encoding.
$idsecret = base64_encode($this->clientid . ':' . $this->clientsecret);
We are using GG4L and they use periods (.) in their client-id.
We also found that in our case the additional scope context (oauth2_client.php:124) is breaking the authorization. The scopes referenced in the code AND in the IMS specification (https://purl.imsglobal.org/spec/or/v1p1/scope/*) are dead/invalid links. GG4L does not require this context, so I think scopes should be optional and configurable.
Hello @bwml can you tell me where you got these values :
Token URL One Roster Root URL Authentication Client ID Authentication Secret
Can you tell me where you find these values as it doesn't provide any documentation for that.
@saxenapritesh All this info is usually provided by the OneRoster API Provider.
@VFXpro
I have got these 3 values from classlink oneroaster :
One Roster Root URL Authentication Client ID Authentication Secret
But i didn't got anything regarding ( Token URL ) can you tell me where i will find or in your portal where you find that.
@saxenapritesh, this will be somewhere within Classlink. It may be the same as the Root URL, or it may not be.
Looking at the Developer docs for Classlink, it looks like this is the URL: https://launchpad.classlink.com/oauth2/v2/auth
More docs are available at https://developer.classlink.com/docs/oauth2-workflow
Hello @andrewnicols and @VFXpro Is this plugin supported by Moddle 4.0 Vesrion ?
Describe the bug I just installed the latest version of your plugin and clicked on "Test Connection"
To Reproduce Steps to reproduce the behavior:
Expected behavior A successful test connection.
Screenshots If applicable, add screenshots to help explain your problem.
Moodle (please complete the following information): 3.11
OneRoster Provider (please complete the following information):
Additional context Add any other context about the problem here.