-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathGoogleAuthenticatorSettingsDTO.php
More file actions
94 lines (82 loc) · 3.38 KB
/
GoogleAuthenticatorSettingsDTO.php
File metadata and controls
94 lines (82 loc) · 3.38 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
89
90
91
92
93
94
<?php declare(strict_types=1);
/**
* Class GoogleAuthenticatorSettingsDTO
*
* @author Robin 'codeFareith' von den Bergen <robinvonberg@gmx.de>
* @copyright (c) 2018-2022 by Robin von den Bergen
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version 1.0.0
*
* @link https://github.com/codeFareith/cf_google_authenticator
* @see https://www.fareith.de
* @see https://typo3.org
*/
namespace CodeFareith\CfGoogleAuthenticator\Domain\DataTransferObject;
use CodeFareith\CfGoogleAuthenticator\Domain\Struct\GoogleAuthenticatorSettings;
/**
* Data transfer object for google authenticator settings
*
* This class is used to pass information about a user's Google Authenticator
* configuration through the various software layers (e.g. for verification and
* validation) as soon as a user updates their account settings.
*
* @see \CodeFareith\CfGoogleAuthenticator\Handler\GoogleAuthenticatorSetupHandler
*
* @package CodeFareith\CfGoogleAuthenticator\Domain\DataTransferObject
* @since 1.0.0
*/
class GoogleAuthenticatorSettingsDTO
{
/*─────────────────────────────────────────────────────────────────────────────*\
Properties
\*─────────────────────────────────────────────────────────────────────────────*/
/**
* @var GoogleAuthenticatorSettings
*/
protected $oldSettings;
/**
* @var GoogleAuthenticatorSettings
*/
protected $newSettings;
/**
* @var string
*/
protected $oneTimePassword;
/*─────────────────────────────────────────────────────────────────────────────*\
Methods
\*─────────────────────────────────────────────────────────────────────────────*/
public function __construct(
GoogleAuthenticatorSettings $oldSettings = null,
GoogleAuthenticatorSettings $newSettings = null,
string $oneTimePassword = null
)
{
$this->oldSettings = $oldSettings;
$this->newSettings = $newSettings;
$this->oneTimePassword = $oneTimePassword;
}
public function getOldSettings(): GoogleAuthenticatorSettings
{
return $this->oldSettings;
}
public function setOldSettings(GoogleAuthenticatorSettings $oldSettings): void
{
$this->oldSettings = $oldSettings;
}
public function getNewSettings(): GoogleAuthenticatorSettings
{
return $this->newSettings;
}
public function setNewSettings(GoogleAuthenticatorSettings $newSettings): void
{
$this->newSettings = $newSettings;
}
public function getOneTimePassword(): string
{
return $this->oneTimePassword;
}
public function setOneTimePassword(string $oneTimePassword): void
{
$this->oneTimePassword = $oneTimePassword;
}
}