Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 579... Línea 579...
579
        } else {
579
        } else {
580
            $params['client_id'] = $this->clientid;
580
            $params['client_id'] = $this->clientid;
581
            $params['client_secret'] = $this->clientsecret;
581
            $params['client_secret'] = $this->clientsecret;
582
        }
582
        }
Línea -... Línea 583...
-
 
583
 
-
 
584
        // If we have additional parameters, add them to the request.
-
 
585
        if ($this->get_additional_upgrade_token_parameters()) {
-
 
586
            $params = array_merge($params, $this->get_additional_upgrade_token_parameters());
-
 
587
        }
583
 
588
 
584
        // Requests can either use http GET or POST.
589
        // Requests can either use http GET or POST.
585
        if ($this->use_http_get()) {
590
        if ($this->use_http_get()) {
586
            $response = $this->get($this->token_url(), $params);
591
            $response = $this->get($this->token_url(), $params);
587
        } else {
592
        } else {
Línea 779... Línea 784...
779
     * @return bool true if GET should be used
784
     * @return bool true if GET should be used
780
     */
785
     */
781
    protected function use_http_get() {
786
    protected function use_http_get() {
782
        return false;
787
        return false;
783
    }
788
    }
-
 
789
 
-
 
790
    /**
-
 
791
     * An additional array of url params to pass with upgrade token request.
-
 
792
     *
-
 
793
     * @return array of name value pairs.
-
 
794
     */
-
 
795
    public function get_additional_upgrade_token_parameters(): array {
-
 
796
        return [];
-
 
797
    }
784
}
798
}