ICsrfProtection Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides cross-origin request protection based on Fetch Metadata headers (Sec-Fetch-Site) and Origin header validation. This is a lightweight defense against CSRF attacks that does not require tokens or DataProtection.
public interface ICsrfProtection
type ICsrfProtection = interface
Public Interface ICsrfProtection
Methods
| Name | Description |
|---|---|
| ValidateAsync(HttpContext) |
Validates whether the request should be allowed based on its origin. |