1 |
efrain |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
namespace Packback\Lti1p3\Interfaces;
|
|
|
4 |
|
|
|
5 |
use Psr\Http\Message\ResponseInterface;
|
|
|
6 |
|
|
|
7 |
/** @internal */
|
|
|
8 |
interface ILtiServiceConnector
|
|
|
9 |
{
|
|
|
10 |
public function getAccessToken(ILtiRegistration $registration, array $scopes): string;
|
|
|
11 |
|
|
|
12 |
public function makeRequest(IServiceRequest $request): ResponseInterface;
|
|
|
13 |
|
|
|
14 |
public function getResponseBody(ResponseInterface $response): ?array;
|
|
|
15 |
|
|
|
16 |
public function getResponseHeaders(ResponseInterface $response): ?array;
|
|
|
17 |
|
|
|
18 |
public function makeServiceRequest(
|
|
|
19 |
ILtiRegistration $registration,
|
|
|
20 |
array $scopes,
|
|
|
21 |
IServiceRequest $request,
|
|
|
22 |
bool $shouldRetry = true
|
|
|
23 |
): array;
|
|
|
24 |
|
|
|
25 |
public function getAll(
|
|
|
26 |
ILtiRegistration $registration,
|
|
|
27 |
array $scopes,
|
|
|
28 |
IServiceRequest $request,
|
|
|
29 |
?string $key
|
|
|
30 |
): array;
|
|
|
31 |
|
|
|
32 |
public function setDebuggingMode(bool $enable): ILtiServiceConnector;
|
|
|
33 |
}
|