|
11 | 11 | use DevNet\System\PropertyTrait; |
12 | 12 | use DevNet\Web\Http\Message\HttpContext; |
13 | 13 |
|
14 | | -class Antiforgery implements IAntiforgery |
| 14 | +class AntiForgery implements IAntiForgery |
15 | 15 | { |
16 | 16 | use PropertyTrait; |
17 | 17 |
|
18 | | - private AntiforgeryOptions $options; |
19 | | - private AntiforgeryTokenGenerator $generator; |
20 | | - private AntiforgeryTokenStore $store; |
| 18 | + private AntiForgeryOptions $options; |
| 19 | + private AntiForgeryTokenGenerator $generator; |
| 20 | + private AntiForgeryTokenStore $store; |
21 | 21 |
|
22 | | - public function __construct(AntiforgeryOptions $options) |
| 22 | + public function __construct(AntiForgeryOptions $options) |
23 | 23 | { |
24 | 24 | if ($options->Cookie->HttpOnly === null) { |
25 | 25 | $options->Cookie->HttpOnly = true; |
26 | 26 | } |
27 | 27 |
|
28 | 28 | $this->options = $options; |
29 | | - $this->generator = new AntiforgeryTokenGenerator(); |
30 | | - $this->store = new AntiforgeryTokenStore($options); |
| 29 | + $this->generator = new AntiForgeryTokenGenerator(); |
| 30 | + $this->store = new AntiForgeryTokenStore($options); |
31 | 31 | } |
32 | 32 |
|
33 | | - public function get_Options(): AntiforgeryOptions |
| 33 | + public function get_Options(): AntiForgeryOptions |
34 | 34 | { |
35 | 35 | return $this->options; |
36 | 36 | } |
37 | 37 |
|
38 | | - public function getToken(): AntiforgeryToken |
| 38 | + public function getToken(): AntiForgeryToken |
39 | 39 | { |
40 | 40 | $token = $this->store->getCookieToken(); |
41 | 41 | if ($token) { |
42 | 42 | return $token; |
43 | 43 | } |
44 | 44 |
|
45 | | - $token = new AntiforgeryToken(); |
| 45 | + $token = new AntiForgeryToken(); |
46 | 46 | $this->store->saveCookieToken($token); |
47 | 47 | return $token; |
48 | 48 | } |
|
0 commit comments