1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* Sasl library. |
5
|
|
|
* |
6
|
|
|
* Copyright (c) 2002-2003 Richard Heyes, |
7
|
|
|
* 2014-2023 Fabian Grutschus |
8
|
|
|
* All rights reserved. |
9
|
|
|
* |
10
|
|
|
* Redistribution and use in source and binary forms, with or without |
11
|
|
|
* modification, are permitted provided that the following conditions |
12
|
|
|
* are met: |
13
|
|
|
* |
14
|
|
|
* o Redistributions of source code must retain the above copyright |
15
|
|
|
* notice, this list of conditions and the following disclaimer. |
16
|
|
|
* o Redistributions in binary form must reproduce the above copyright |
17
|
|
|
* notice, this list of conditions and the following disclaimer in the |
18
|
|
|
* documentation and/or other materials provided with the distribution.| |
19
|
|
|
* o The names of the authors may not be used to endorse or promote |
20
|
|
|
* products derived from this software without specific prior written |
21
|
|
|
* permission. |
22
|
|
|
* |
23
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
24
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
25
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
26
|
|
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
27
|
|
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
28
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
29
|
|
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
30
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
31
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
32
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
33
|
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
34
|
|
|
* |
35
|
|
|
* @author Fabian Grutschus <[email protected]> |
36
|
|
|
*/ |
37
|
|
|
|
38
|
|
|
namespace Fabiang\Sasl\Options; |
39
|
|
|
|
40
|
|
|
class DowngradeProtectionOptions |
41
|
|
|
{ |
42
|
|
|
/** |
43
|
|
|
* @var array |
44
|
|
|
*/ |
45
|
|
|
private $allowedMechanisms = array(); |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @var array |
49
|
|
|
*/ |
50
|
|
|
private $allowedChannelBindings = array(); |
51
|
|
|
|
52
|
|
|
public function __construct(array $allowedMechanisms, array $allowedChannelBindings) |
53
|
|
|
{ |
54
|
|
|
$this->allowedMechanisms = $allowedMechanisms; |
55
|
|
|
$this->allowedChannelBindings = $allowedChannelBindings; |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @return array |
60
|
|
|
*/ |
61
|
|
|
public function getAllowedMechanisms() |
62
|
|
|
{ |
63
|
|
|
return $this->allowedMechanisms; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @return array |
68
|
|
|
*/ |
69
|
|
|
public function getAllowedChannelBindings() |
70
|
|
|
{ |
71
|
|
|
return $this->allowedChannelBindings; |
72
|
|
|
} |
73
|
|
|
} |
74
|
|
|
|