mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
5066c60206
In order to make easier to create and maintain new OAuth2 services, a couple of classes have been added: - discovery\* contains methods related to the discovery system. Until now, only OpenID Connect was supported by Moodle so all the code was centralised in api.php. With this patch, as IMS OBv2.1 has a different discovery system, a new abstract class (base_definition) has been added to be called and let every discovery system (OpenID Connect, IMS Badge Connect...) implement their own methods. - service\* . Instead of keep adding methods to the api, the service namespace has been created to store all the standard issuer services. An interface (issuer_interface) has been created and all the services should implement it. This patch creates the "IMS OBv2.1" and "Custom" services and moves the methods for "Google" service because it uses the OpenID connect discovery system.