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)
22
public async ValueTask<
CsrfProtectionResult
> ValidateAsync(HttpContext context)
31
return
CsrfProtectionResult
.Allowed();
40
return
CsrfProtectionResult
.Allowed();
58
return
CsrfProtectionResult
.Allowed();
66
return
CsrfProtectionResult
.Denied();
73
?
CsrfProtectionResult
.Allowed()
74
:
CsrfProtectionResult
.Denied();
80
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);