-
Notifications
You must be signed in to change notification settings - Fork 0
/
AuthRequest.php
56 lines (45 loc) · 1.01 KB
/
AuthRequest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php declare(strict_types=1);
/**
* This File is part of JTL-Software
*
* User: pkanngiesser
* Date: 2019/09/23
*/
namespace JTL\SCX\Client\Api\Auth\Request;
use JTL\SCX\Client\Request\ScxApiRequest;
class AuthRequest implements ScxApiRequest
{
private string $refreshToken;
public function __construct(string $refreshToken)
{
$this->refreshToken = $refreshToken;
}
public function getRefreshToken(): string
{
return $this->refreshToken;
}
public function getUrl(): string
{
return '/v1/auth';
}
public function getHttpMethod(): string
{
return self::HTTP_METHOD_POST;
}
public function getParams(): array
{
return ['refreshToken' => $this->getRefreshToken()];
}
public function getBody(): ?string
{
return null;
}
public function getContentType(): string
{
return self::CONTENT_TYPE_FORM;
}
public function getAdditionalHeaders(): array
{
return [];
}
}