public static function get_system_scopes_for_issuer($issuer) {
        $scopes = $issuer->get('loginscopesoffline');

        $pluginsfunction = get_plugins_with_function('oauth2_system_scopes', 'lib.php');
        foreach ($pluginsfunction as $plugintype => $plugins) {
            foreach ($plugins as $pluginfunction) {
                // Get additional scopes from the plugin.
                $pluginscopes = $pluginfunction($issuer);
                if (empty($pluginscopes)) {
                    continue;
                }

                // Merge the additional scopes with the existing ones.
                $additionalscopes = explode(' ', $pluginscopes);

                foreach ($additionalscopes as $scope) {
                    if (!empty($scope)) {
                        if (strpos(' ' . $scopes . ' ', ' ' . $scope . ' ') === false) {
                            $scopes .= ' ' . $scope;
                        }
                    }
                }
            }
        }

        return $scopes;
    }
public static function get_system_scopes_for_issuer($issuer) {
        $scopes = $issuer->get('loginscopesoffline');

        $pluginsfunction = get_plugins_with_function('oauth2_system_scopes', 'lib.php');
        foreach ($pluginsfunction as $plugintype => $plugins) {
            foreach ($plugins as $pluginfunction) {
                // Get additional scopes from the plugin.
                $pluginscopes = $pluginfunction($issuer);
                if (empty($pluginscopes)) {
                    continue;
                }

                // Merge the additional scopes with the existing ones.
                $additionalscopes = explode(' ', $pluginscopes);

                foreach ($additionalscopes as $scope) {
                    if (!empty($scope)) {
                        if (strpos(' ' . $scopes . ' ', ' ' . $scope . ' ') === false) {
                            $scopes .= ' ' . $scope;
                        }
                    }
                }
            }
        }

        return $scopes;
    }
public static function get_system_scopes_for_issuer ( $ issuer ) { $ scopes = $ issuer -> get ( 'loginscopesoffline' ) ; $ pluginsfunction = get_plugins_with_function ( 'oauth2_system_scopes' , 'lib.php' ) ; foreach ( $ pluginsfunction as $ plugintype => $ plugins ) { foreach ( $ plugins as $ pluginfunction ) { // Get additional scopes from the plugin. $ pluginscopes = $ pluginfunction ( $ issuer ) ; if ( empty ( $ pluginscopes ) ) { continue ; } // Merge the additional scopes with the existing ones. $ additionalscopes = explode ( ' ' , $ pluginscopes ) ; foreach ( $ additionalscopes as $ scope ) { if ( ! empty ( $ scope ) ) { if ( strpos ( ' ' . $ scopes . ' ' , ' ' . $ scope . ' ' ) === false ) { $ scopes .= ' ' . $ scope ; } } } } } return $ scopes ; }
Get the full list of system scopes required by an oauth issuer.
This includes the list required for login as well as any scopes injected by the oauth2_system_scopes callback in plugins.

@param \core\oauth2\issuer $issuer
@return string
Get the full list of system scopes required by an oauth issuer . This includes the list required for login as well as any scopes injected by the oauth2_system_scopes callback in plugins .