2 instantiations of CsrfProtectionResult
Microsoft.AspNetCore.Http.Abstractions (2)
Antiforgery\CsrfProtectionResult.cs (2)
11
private static readonly CsrfProtectionResult _allowed =
new
(isAllowed: true);
12
private static readonly CsrfProtectionResult _denied =
new
(isAllowed: false);
17 references to CsrfProtectionResult
Microsoft.AspNetCore (8)
Internal\DefaultCsrfProtection.cs (8)
13
public async ValueTask<
CsrfProtectionResult
> ValidateAsync(HttpContext context)
22
return
CsrfProtectionResult
.Allowed();
31
return
CsrfProtectionResult
.Allowed();
49
return
CsrfProtectionResult
.Allowed();
57
return
CsrfProtectionResult
.Denied();
64
?
CsrfProtectionResult
.Allowed()
65
:
CsrfProtectionResult
.Denied();
71
return
CsrfProtectionResult
.Allowed();
Microsoft.AspNetCore.Http.Abstractions (9)
Antiforgery\CsrfProtectionResult.cs (6)
11
private static readonly
CsrfProtectionResult
_allowed = new(isAllowed: true);
12
private static readonly
CsrfProtectionResult
_denied = new(isAllowed: false);
25
/// Returns a <see cref="
CsrfProtectionResult
"/> indicating the request is allowed.
27
public static
CsrfProtectionResult
Allowed() => _allowed;
30
/// Returns a <see cref="
CsrfProtectionResult
"/> indicating the request is denied.
32
public static
CsrfProtectionResult
Denied() => _denied;
Antiforgery\ICsrfProtection.cs (3)
20
/// A <see cref="ValueTask{TResult}"/> that resolves to a <see cref="
CsrfProtectionResult
"/> whose
21
/// <see cref="
CsrfProtectionResult
.IsAllowed"/> is <see langword="true"/> when the request is
25
ValueTask<
CsrfProtectionResult
> ValidateAsync(HttpContext context);