public static function get_user_oauth_client(issuer $issuer, moodle_url $currenturl, $additionalscopes = '') {
        $client = new \core\oauth2\client($issuer, $currenturl, $additionalscopes);

        return $client;
    }
public static function get_user_oauth_client(issuer $issuer, moodle_url $currenturl, $additionalscopes = '') {
        $client = new \core\oauth2\client($issuer, $currenturl, $additionalscopes);

        return $client;
    }
public static function get_user_oauth_client ( issuer $ issuer , moodle_url $ currenturl , $ additionalscopes = '' ) { $ client = new \ core \ oauth2 \ client ( $ issuer , $ currenturl , $ additionalscopes ) ; return $ client ; }
Get an authenticated oauth2 client using the current user account.
This call does the redirect dance back to the current page after authentication.

@param \core\oauth2\issuer $issuer The desired OAuth issuer
@param moodle_url $currenturl The url to the current page.
@param string $additionalscopes The additional scopes required for authorization.
@return \core\oauth2\client
Get an authenticated oauth2 client using the current user account . This call does the redirect dance back to the current page after authentication .