General developer forum

capabilities in auth plugin

 
Picture of Kritika Sood
capabilities in auth plugin
 

Hello  guys, 

I have built a auth type plugin which contains various functions to fetch the Moodle data. The functions in this plugin are called by a external website which then uses this data to show on there site. 

The functions in the plugin are called by external website by creating a url in which we pass user id or course id to get the relevant data.

Now for security reasons I want to add the capabilities in the plugin so that only authenticated user can access the data.

So the questions is how to add the capabilities in auth plugin and how to use them ?

Please help me out ! 

 
Average of ratings: -
Picture of Olumuyiwa Taiwo
Re: capabilities in auth plugin
Group Particularly helpful Moodlers

You might want to consider adding a web service to your plugin: https://docs.moodle.org/dev/Adding_a_web_service_to_a_plugin

Specific information about adding capability checks is at: https://docs.moodle.org/dev/Adding_a_web_service_to_a_plugin#Context_and_Capability_checks

 
Average of ratings: -