Rev 1116 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1116 | Rev 1212 | ||
---|---|---|---|
1 | <?php |
1 | <?php |
2 | 2 | ||
3 | /* |
3 | /* |
4 | * OIDplus 2.0 |
4 | * OIDplus 2.0 |
5 | * Copyright 2019 - 2023 Daniel Marschall, ViaThinkSoft |
5 | * Copyright 2019 - 2023 Daniel Marschall, ViaThinkSoft |
6 | * |
6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * you may not use this file except in compliance with the License. |
8 | * you may not use this file except in compliance with the License. |
9 | * You may obtain a copy of the License at |
9 | * You may obtain a copy of the License at |
10 | * |
10 | * |
11 | * http://www.apache.org/licenses/LICENSE-2.0 |
11 | * http://www.apache.org/licenses/LICENSE-2.0 |
12 | * |
12 | * |
13 | * Unless required by applicable law or agreed to in writing, software |
13 | * Unless required by applicable law or agreed to in writing, software |
14 | * distributed under the License is distributed on an "AS IS" BASIS, |
14 | * distributed under the License is distributed on an "AS IS" BASIS, |
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
16 | * See the License for the specific language governing permissions and |
16 | * See the License for the specific language governing permissions and |
17 | * limitations under the License. |
17 | * limitations under the License. |
18 | */ |
18 | */ |
19 | 19 | ||
20 | namespace ViaThinkSoft\OIDplus; |
20 | namespace ViaThinkSoft\OIDplus; |
21 | 21 | ||
22 | // phpcs:disable PSR1.Files.SideEffects |
22 | // phpcs:disable PSR1.Files.SideEffects |
23 | \defined('INSIDE_OIDPLUS') or die; |
23 | \defined('INSIDE_OIDPLUS') or die; |
24 | // phpcs:enable PSR1.Files.SideEffects |
24 | // phpcs:enable PSR1.Files.SideEffects |
25 | 25 | ||
26 | abstract class OIDplusAuthPlugin extends OIDplusPlugin { |
26 | abstract class OIDplusAuthPlugin extends OIDplusPlugin { |
- | 27 | ||
- | 28 | /** |
|
- | 29 | * @return string |
|
- | 30 | */ |
|
- | 31 | public abstract function id(): string; |
|
- | 32 | ||
27 | /** |
33 | /** |
28 | * @param OIDplusRAAuthInfo $authInfo |
34 | * @param OIDplusRAAuthInfo $authInfo |
29 | * @param string $check_password |
35 | * @param string $check_password |
30 | * @return bool |
36 | * @return bool |
31 | */ |
37 | */ |
32 | public abstract function verify(OIDplusRAAuthInfo $authInfo, string $check_password): bool; |
38 | public abstract function verify(OIDplusRAAuthInfo $authInfo, string $check_password): bool; |
33 | 39 | ||
34 | /** |
40 | /** |
35 | * @param string $password |
41 | * @param string $password |
36 | * @return OIDplusRAAuthInfo |
42 | * @return OIDplusRAAuthInfo |
37 | */ |
43 | */ |
38 | public abstract function generate(string $password): OIDplusRAAuthInfo; |
44 | public abstract function generate(string $password): OIDplusRAAuthInfo; |
39 | 45 | ||
40 | /** |
46 | /** |
41 | * @param string $reason |
47 | * @param string $reason |
42 | * @return bool |
48 | * @return bool |
43 | */ |
49 | */ |
44 | public abstract function availableForHash(string &$reason): bool; |
50 | public abstract function availableForHash(string &$reason): bool; |
45 | 51 | ||
46 | /** |
52 | /** |
47 | * @param string $reason |
53 | * @param string $reason |
48 | * @return bool |
54 | * @return bool |
49 | */ |
55 | */ |
50 | public abstract function availableForVerify(string &$reason): bool; |
56 | public abstract function availableForVerify(string &$reason): bool; |
51 | } |
57 | } |
52 | 58 |