Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
core\oauth2\service\imsobv2p1 Class Reference

Class for IMS Open Badges v2.1 oAuth service, with the specific methods related to it. More...

Inheritance diagram for core\oauth2\service\imsobv2p1:

Static Public Member Functions

static create_endpoints (issuer $issuer)
 Create endpoints for this issuer.
 
static create_endpoints (issuer $issuer)
 Create endpoints for this issuer.
 
static create_field_mappings (issuer $issuer)
 Process how to map user field information.
 
static discover_endpoints ($issuer)
 If the discovery endpoint exists for this issuer, try and determine the list of valid endpoints.
 
static discover_endpoints ($issuer)
 If the discovery endpoint exists for this issuer, try and determine the list of valid endpoints.
 
static get_discovery_endpoint_url (issuer $issuer)
 Get the URL for the discovery manifest.
 
static init ()
 Build an OAuth2 issuer, with all the default values for this service.
 

Static Protected Member Functions

static create_discovery_endpoint (issuer $issuer, string $url)
 Helper method to create discovery endpoint.
 
static process_configuration_json (issuer $issuer, stdClass $info)
 Process the discovery information and create endpoints defined with the expected format.
 
static register (issuer $issuer)
 Self-register the issuer if the 'registration' endpoint exists and client id and secret aren't defined.
 

Detailed Description

Class for IMS Open Badges v2.1 oAuth service, with the specific methods related to it.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ create_discovery_endpoint()

static core\oauth2\discovery\base_definition::create_discovery_endpoint ( issuer $issuer,
string $url )
staticprotectedinherited

Helper method to create discovery endpoint.

Parameters
issuer$issuerIssuer the endpoints should be created for.
string$urlDiscovery endpoint URL.
Return values
endpointThe endpoint created.
Exceptions
core\invalid_persistent_exception

◆ create_endpoints() [1/2]

static core\oauth2\discovery\base_definition::create_endpoints ( issuer $issuer)
staticinherited

Create endpoints for this issuer.

Parameters
issuer$issuerIssuer the endpoints should be created for.
Return values
issuer

Reimplemented in core\oauth2\service\clever, core\oauth2\service\facebook, core\oauth2\service\microsoft, and core\oauth2\service\nextcloud.

◆ create_endpoints() [2/2]

static core\oauth2\service\issuer_interface::create_endpoints ( issuer $issuer)
staticinherited

Create endpoints for this issuer.

Parameters
issuer$issuerIssuer the endpoints should be created for.
Return values
issuer

Implemented in core\oauth2\service\clever, core\oauth2\service\facebook, core\oauth2\service\microsoft, core\oauth2\service\moodlenet, and core\oauth2\service\nextcloud.

◆ create_field_mappings()

static core\oauth2\service\imsobv2p1::create_field_mappings ( issuer $issuer)
static

Process how to map user field information.

Parameters
issuer$issuerThe OAuth issuer the endpoints should be discovered for.
Return values
void

Reimplemented from core\oauth2\discovery\imsbadgeconnect.

◆ discover_endpoints() [1/2]

static core\oauth2\discovery\base_definition::discover_endpoints ( $issuer)
staticinherited

If the discovery endpoint exists for this issuer, try and determine the list of valid endpoints.

Parameters
issuer$issuer
Return values
intThe number of discovered services.

◆ discover_endpoints() [2/2]

static core\oauth2\service\issuer_interface::discover_endpoints ( $issuer)
staticinherited

If the discovery endpoint exists for this issuer, try and determine the list of valid endpoints.

Parameters
issuer$issuer
Return values
intThe number of discovered services.

Implemented in core\oauth2\service\moodlenet.

◆ get_discovery_endpoint_url()

static core\oauth2\discovery\imsbadgeconnect::get_discovery_endpoint_url ( issuer $issuer)
staticinherited

Get the URL for the discovery manifest.

Parameters
issuer$issuerThe OAuth issuer the endpoints should be discovered for.
Return values
stringThe URL of the discovery file, containing the endpoints.

Reimplemented from core\oauth2\discovery\base_definition.

◆ init()

static core\oauth2\service\imsobv2p1::init ( )
static

Build an OAuth2 issuer, with all the default values for this service.

Return values
issuer|nullThe issuer initialised with proper default values.

Implements core\oauth2\service\issuer_interface.

◆ process_configuration_json()

static core\oauth2\discovery\imsbadgeconnect::process_configuration_json ( issuer $issuer,
stdClass $info )
staticprotectedinherited

Process the discovery information and create endpoints defined with the expected format.

Parameters
issuer$issuerThe OAuth issuer the endpoints should be discovered for.
stdClass$infoThe discovery information, with the endpoints to process and create.
Return values
void

Reimplemented from core\oauth2\discovery\base_definition.

◆ register()

static core\oauth2\discovery\imsbadgeconnect::register ( issuer $issuer)
staticprotectedinherited

Self-register the issuer if the 'registration' endpoint exists and client id and secret aren't defined.

Parameters
issuer$issuerThe OAuth issuer to register.
Return values
void

Reimplemented from core\oauth2\discovery\base_definition.


The documentation for this class was generated from the following file: