Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2363

Using OAuth2 to connect to Web Services

$
0
0

by Ryan Carpenter.  

I'm trying to connect my Moodle plugin to a web service that uses OAuth2 for user/client authentication.  The idea is for a Moodle administrator to be given a client ID and client secret, then enter those into Moodle so that the Moodle instance acts as a client application for other Moodle users to reach the web services.  Unfortunately, the documentation only seems to hint that such a use case is possible, without giving any details on implementation.


Importantly, web service doesn't use OAuth2 yet; I'm trying to make certain that I'll be able to connect Moodle to it before I invest the time in fully testing testing that change.  For now, I've been using this Node.js/Sails.js project to stand in as a simple API server/OAuth2 Server.  I've tested it in Postman and it seems to be working.

The problem is that Moodle seems to be asking for different details than the OAuth2 server generates.  Moodle's New Issuer form also looks quite different from Postman's New Token form.  For instance, it's not clear to me what Callback URL the auth server should use when it finishes granting authorization to the Moodle Admin.

Is there any other documentation on OAuth2 Services?  Anyone out there who's used them for a web service (rather than Open ID for user login)?  Thanks in advance.


Viewing all articles
Browse latest Browse all 2363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>