I've recently updated the moodle sgoauth server files to include api calls that we needed for an integration project we are currently doing. For this integration we also needed authorization tokens to be granted automatically so I added support for specifying autoauthorize in the datamodel.
While testing, I encountered a bug on the elgg consumer code that prevented the cron jobs from deleting stale tokens so I fixed that as well.
Download the updated code.
Here is the link to the post announcing the first release.
1) Set up in Wordpress
there are 4 fields that need to be filled in, Consumer Key, Secret, OAuth Server Base URL and OAuth Server Name. Where do I get that information in moodle?
2) at the step 3 on how to install the server.
"... At this point the necessary database tables have been setup.
You'll need to create records for your consumers by manually
inserting into the database. Some sample sql insert commands are:
mysql> insert into oauth_consumers (name, callbackurl, cancelurl, secret, consumerkey, timecreated, timemodified)
values ('Wordpress', 'http://my.wordpress.url/wp-load.php?action=sg_oauth&service=logincallback',
'http://my.wordpress.url/wp-login.php', 'mysecretstring', 'mywordpressconsumerkey',
unix_timestamp(current_timestamp()), unix_timestamp(current_timestamp())); ....."
It is not clear for me, Please can you explain it.
Thanks in advance
by Carlos Kiyan on 07/25/12
You might want to download the updated code from github instead -- https://github.com/solutiongrove/sg-moodle-oauth There should be instructions in the readme file.
by Deds Castillo on 07/25/12
by Azeem Sai on 01/20/14
by james leroy on 05/12/14
by vishnu narayanan on 07/11/14
by Lindur Ginta on 08/11/14
by adsgy kingcd on 08/20/14
by muneer ahmed on 09/23/14
by muneer ahmed on 09/29/14