Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
interface Microsoft.​AspNetCore.​Http.​Features.​ITrackingConsentFeature
Assembly: Microsoft.AspNetCore.Http.Features
Used to query, grant, and withdraw user consent regarding the storage of user information related to site activity and functionality.
Properties
bool
IsConsentNeeded
Indicates if consent is required for the given request.
bool
HasConsent
Indicates if consent was given.
bool
CanTrack
Indicates either if consent has been given or if consent is not required.
Methods
void
GrantConsent​()
Grants consent for this request. If the response has not yet started then
this will also grant consent for future requests.
void
WithdrawConsent​()
Withdraws consent for this request. If the response has not yet started then
this will also withdraw consent for future requests.
string
CreateConsentCookie​()
Creates a consent cookie for use when granting consent from a javascript client.