public static function create_endpoints_for_standard_issuer($type, $issuer) {
        require_capability('moodle/site:config', context_system::instance());
        if ($type == 'google') {
            $issuer = self::create_endpoints_for_google($issuer);
            self::discover_endpoints($issuer);
            return $issuer;
        } else if ($type == 'microsoft') {
            return self::create_endpoints_for_microsoft($issuer);
        } else if ($type == 'facebook') {
            return self::create_endpoints_for_facebook($issuer);
        } else if ($type == 'nextcloud') {
            return self::create_endpoints_for_nextcloud($issuer);
        } else {
            throw new moodle_exception('OAuth 2 service type not recognised: ' . $type);
        }
    }
public static function create_endpoints_for_standard_issuer($type, $issuer) {
        require_capability('moodle/site:config', context_system::instance());
        if ($type == 'google') {
            $issuer = self::create_endpoints_for_google($issuer);
            self::discover_endpoints($issuer);
            return $issuer;
        } else if ($type == 'microsoft') {
            return self::create_endpoints_for_microsoft($issuer);
        } else if ($type == 'facebook') {
            return self::create_endpoints_for_facebook($issuer);
        } else if ($type == 'nextcloud') {
            return self::create_endpoints_for_nextcloud($issuer);
        } else {
            throw new moodle_exception('OAuth 2 service type not recognised: ' . $type);
        }
    }
public static function create_endpoints_for_standard_issuer ( $ type , $ issuer ) { require_capability ( 'moodle/site:config' , context_system :: instance ( ) ) ; if ( $ type == 'google' ) { $ issuer = self :: create_endpoints_for_google ( $ issuer ) ; self :: discover_endpoints ( $ issuer ) ; return $ issuer ; } else if ( $ type == 'microsoft' ) { return self :: create_endpoints_for_microsoft ( $ issuer ) ; } else if ( $ type == 'facebook' ) { return self :: create_endpoints_for_facebook ( $ issuer ) ; } else if ( $ type == 'nextcloud' ) { return self :: create_endpoints_for_nextcloud ( $ issuer ) ; } else { throw new moodle_exception ( 'OAuth 2 service type not recognised: ' . $ type ) ; } }
Create endpoints for standard issuers, based on the issuer created from submitted data.
@param string $type One of google, facebook, microsoft, nextcloud
@param issuer $issuer issuer the endpoints should be created for.
@return \core\oauth2\issuer
Create endpoints for standard issuers based on the issuer created from submitted data .