Moodle Oauth Provider

Moodle Oauth Provider

by Juan Manuel Rubiales de la Cruz -
Number of replies: 1

Hi,

I'm working on an LTI project that requires an API token to send requests to the Moodle API. The case is that I need a token provided by Moodle to authenticate my users and grant them the necessary scopes to make the requests. I cannot use the services of YouTube, Facebook, etc. Instead, I need Moodle to be the provider of OAuth tokens.

How can I achieve this?

Thank you.


Average of ratings: -
In reply to Juan Manuel Rubiales de la Cruz

Re: Moodle Oauth Provider

by Jake Dallimore -
Picture of Core developers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Juan,

It's not 100% clear what you're trying to achieve, so it's a little hard to answer this one. Are you building an LTI tool? Something else?  Either way, a few of things to point out, since you mention LTI.

Moodle's LTI consumer (when Moodle act at the platform), will naturally provide id tokens during launch (to authenticate the user), and tools can request access tokens to call those LTI services supported by Moodle. All of this is restricted to the mod_lti space and only LTI scopes are used. I.e. these tokens are only for use with LTI and LTI services and not for any of Moodle's other web services. If you're building an LTI tool, these are exactly the tokens you want to use.

Generally speaking, Moodle is not an identity provider. There is no support for that outside of LTI.

Hope that helps. If not, please include more information about what it is you're aiming to do.

Cheers,
Jake