Issues (58)

src/Entities/RefreshTokenEntityInterface.php (2 issues)

1
<?php
2
3
/**
4
 * @author      Alex Bilbie <[email protected]>
5
 * @copyright   Copyright (c) Alex Bilbie
6
 * @license     http://mit-license.org/
7
 *
8
 * @link        https://github.com/thephpleague/oauth2-server
9
 */
10
11
declare(strict_types=1);
12
13
namespace League\OAuth2\Server\Entities;
14
15
use DateTimeImmutable;
16
17
interface RefreshTokenEntityInterface
18
{
19
    /**
20
     * Get the token's identifier.
21
     *
22
     * @return non-empty-string
0 ignored issues
show
Documentation Bug introduced by
The doc comment non-empty-string at position 0 could not be parsed: Unknown type name 'non-empty-string' at position 0 in non-empty-string.
Loading history...
23
     */
24
    public function getIdentifier(): string;
25
26
    /**
27
     * Set the token's identifier.
28
     *
29
     * @param non-empty-string $identifier
0 ignored issues
show
Documentation Bug introduced by
The doc comment non-empty-string at position 0 could not be parsed: Unknown type name 'non-empty-string' at position 0 in non-empty-string.
Loading history...
30
     */
31
    public function setIdentifier(string $identifier): void;
32
33
    /**
34
     * Get the token's expiry date time.
35
     */
36
    public function getExpiryDateTime(): DateTimeImmutable;
37
38
    /**
39
     * Set the date time when the token expires.
40
     */
41
    public function setExpiryDateTime(DateTimeImmutable $dateTime): void;
42
43
    /**
44
     * Set the access token that the refresh token was associated with.
45
     */
46
    public function setAccessToken(AccessTokenEntityInterface $accessToken): void;
47
48
    /**
49
     * Get the access token that the refresh token was originally associated with.
50
     */
51
    public function getAccessToken(): AccessTokenEntityInterface;
52
}
53