-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathTokenGenerationRequestEvent.php
More file actions
88 lines (68 loc) · 2.14 KB
/
TokenGenerationRequestEvent.php
File metadata and controls
88 lines (68 loc) · 2.14 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\OIDCIdentityProvider\Event;
use OCP\EventDispatcher\Event;
/**
* This event is emitted by other apps that need an access+id token from one of our Oidc clients
*/
class TokenGenerationRequestEvent extends Event {
private ?string $accessToken = null;
private ?string $idToken = null;
private ?string $refreshToken = null;
private ?int $expiresIn = null;
private ?int $refreshExpiresIn = null;
public function __construct(
private string $clientIdentifier,
private string $userId,
private string $extraScopes = "",
private string $resource = "",
) {
parent::__construct();
}
public function getClientIdentifier(): string {
return $this->clientIdentifier;
}
public function getUserId(): string {
return $this->userId;
}
public function getExtraScopes(): string {
return $this->extraScopes;
}
public function getResource(): ?string {
return $this->resource;
}
public function getAccessToken(): ?string {
return $this->accessToken;
}
public function setAccessToken(string $accessToken): void {
$this->accessToken = $accessToken;
}
public function getIdToken(): ?string {
return $this->idToken;
}
public function setIdToken(?string $idToken): void {
$this->idToken = $idToken;
}
public function getRefreshToken(): ?string {
return $this->refreshToken;
}
public function setRefreshToken(?string $refreshToken): void {
$this->refreshToken = $refreshToken;
}
public function getExpiresIn(): ?int {
return $this->expiresIn;
}
public function setExpiresIn(?int $expiresIn): void {
$this->expiresIn = $expiresIn;
}
public function getRefreshExpiresIn(): ?int {
return $this->refreshExpiresIn;
}
public function setRefreshExpiresIn(?int $refreshExpiresIn): void {
$this->refreshExpiresIn = $refreshExpiresIn;
}
}