File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 66 * @link https://github.com/DevNet-Framework
77 */
88
9- namespace DevNet \Web \Security \ Authorization ;
9+ namespace DevNet \Web \Endpoint \ Filters ;
1010
1111use DevNet \System \Async \Task ;
1212use DevNet \Web \Endpoint \ActionContext ;
Original file line number Diff line number Diff line change 66 * @link https://github.com/DevNet-Framework
77 */
88
9- namespace DevNet \Web \Security \ Tokens \ Csrf ;
9+ namespace DevNet \Web \Endpoint \ Filters ;
1010
1111use DevNet \System \Async \Task ;
1212use DevNet \Web \Endpoint \ActionContext ;
@@ -21,12 +21,12 @@ class ValidateAntiForgery implements IActionFilter
2121{
2222 public function __invoke (ActionContext $ context , ActionDelegate $ next ): Task
2323 {
24- $ antiforgery = $ context ->HttpContext ->Services ->getService (IAntiForgery::class);
25- if (!$ antiforgery ) {
24+ $ antiForgery = $ context ->HttpContext ->Services ->getService (IAntiForgery::class);
25+ if (!$ antiForgery ) {
2626 throw new AntiForgeryException ("Unable to get IAntiForgery service, make sure to register it as a service! " );
2727 }
2828
29- $ result = $ antiforgery ->validateToken ($ context ->HttpContext );
29+ $ result = $ antiForgery ->validateToken ($ context ->HttpContext );
3030
3131 if (!$ result ) {
3232 throw new AntiForgeryException ("Invalid AntiForgery Token! " , 403 );
You can’t perform that action at this time.
0 commit comments