9 instantiations of AntiforgeryTokenSet
Microsoft.AspNetCore.Antiforgery (2)
Internal\DefaultAntiforgery.cs (1)
422return new AntiforgeryTokenSet(
Internal\DefaultAntiforgeryTokenStore.cs (1)
76return new AntiforgeryTokenSet(requestToken, cookieToken, _options.FormFieldName, _options.HeaderName);
Microsoft.AspNetCore.Antiforgery.Test (5)
DefaultAntiforgeryTest.cs (5)
850var tokenSet = new AntiforgeryTokenSet(null, null, "form-field-name", null); 874var tokenSet = new AntiforgeryTokenSet(null, "cookie-token", "form-field-name", null); 900var tokenSet = new AntiforgeryTokenSet(null, "cookie-token", "form-field-name", "header-name"); 926var tokenSet = new AntiforgeryTokenSet(null, "cookie-token", "form-field-name", "header-name"); 1444.Returns(() => Task.FromResult(new AntiforgeryTokenSet(
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
AntiforgeryExtensionsTest.cs (1)
20var tokenSet = new AntiforgeryTokenSet("request-token", "cookie-token", "form-field", "header");
DefaultHtmlGeneratorTest.cs (1)
1013return new AntiforgeryTokenSet("requestToken", "cookieToken", "formFieldName", "headerName");
52 references to AntiforgeryTokenSet
Microsoft.AspNetCore.Antiforgery (18)
IAntiforgery.cs (6)
15/// Generates an <see cref="AntiforgeryTokenSet"/> for this request and stores the cookie token 20/// <returns>An <see cref="AntiforgeryTokenSet" /> with tokens for the response.</returns> 25AntiforgeryTokenSet GetAndStoreTokens(HttpContext httpContext); 28/// Generates an <see cref="AntiforgeryTokenSet"/> for this request. 31/// <returns>The <see cref="AntiforgeryTokenSet"/> for this request.</returns> 37AntiforgeryTokenSet GetTokens(HttpContext httpContext);
Internal\DefaultAntiforgery.cs (9)
40public AntiforgeryTokenSet GetAndStoreTokens(HttpContext httpContext) 47var tokenSet = Serialize(antiforgeryFeature); 77public AntiforgeryTokenSet GetTokens(HttpContext httpContext) 104var tokens = await _tokenStore.GetRequestTokensAsync(httpContext); 149var tokens = await _tokenStore.GetRequestTokensAsync(httpContext); 182private void ValidateTokens(HttpContext httpContext, AntiforgeryTokenSet antiforgeryTokenSet) 404private AntiforgeryTokenSet Serialize(IAntiforgeryFeature antiforgeryFeature) 431AntiforgeryTokenSet antiforgeryTokenSet, 452AntiforgeryTokenSet antiforgeryTokenSet,
Internal\DefaultAntiforgeryTokenStore.cs (1)
36public async Task<AntiforgeryTokenSet> GetRequestTokensAsync(HttpContext httpContext)
Internal\IAntiforgeryTokenStore.cs (2)
16/// <returns>The <see cref="AntiforgeryTokenSet"/>.</returns> 17Task<AntiforgeryTokenSet> GetRequestTokensAsync(HttpContext httpContext);
Microsoft.AspNetCore.Antiforgery.Test (18)
DefaultAntiforgeryTest.cs (18)
143var tokenset = antiforgery.GetTokens(context.HttpContext); 180var tokenset = antiforgery.GetTokens(context.HttpContext); 200var tokenset = antiforgery.GetTokens(context.HttpContext); 235var tokenset = antiforgery.GetTokens(context.HttpContext); 265var tokenSet = antiforgery.GetAndStoreTokens(context.HttpContext); 298var tokenSet = antiforgery.GetAndStoreTokens(context.HttpContext); 329var tokenSet = antiforgery.GetAndStoreTokens(context.HttpContext); 457var tokenSet = antiforgery.GetAndStoreTokens(context.HttpContext); 491var tokenSet = antiforgery.GetAndStoreTokens(context.HttpContext); 533var tokenset = antiforgery.GetAndStoreTokens(context.HttpContext); 578var tokenset = antiforgery.GetAndStoreTokens(context.HttpContext); 850var tokenSet = new AntiforgeryTokenSet(null, null, "form-field-name", null); 874var tokenSet = new AntiforgeryTokenSet(null, "cookie-token", "form-field-name", null); 900var tokenSet = new AntiforgeryTokenSet(null, "cookie-token", "form-field-name", "header-name"); 926var tokenSet = new AntiforgeryTokenSet(null, "cookie-token", "form-field-name", "header-name"); 1296var tokenSet = antiforgery.GetAndStoreTokens(context.HttpContext); 1335var tokenSet = antiforgery.GetAndStoreTokens(context.HttpContext); 1369var tokenSet = antiforgery.GetAndStoreTokens(context.HttpContext);
Microsoft.AspNetCore.Mvc.FunctionalTests (5)
AntiforgeryMiddlewareTest.cs (4)
38var tokens = antiforgery.GetAndStoreTokens(new DefaultHttpContext()); 122var tokens = antiforgery.GetAndStoreTokens(new DefaultHttpContext()); 154var tokens = antiforgery.GetAndStoreTokens(new DefaultHttpContext()); 186var tokens = antiforgery.GetAndStoreTokens(new DefaultHttpContext());
SimpleWithWebApplicationBuilderTests.cs (1)
268var tokens = antiforgery.GetAndStoreTokens(new DefaultHttpContext());
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
AntiforgeryExtensions.cs (2)
36var tokenSet = antiforgery.GetAndStoreTokens(httpContext); 45public InputContent(AntiforgeryTokenSet tokenSet)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
AntiforgeryExtensionsTest.cs (1)
20var tokenSet = new AntiforgeryTokenSet("request-token", "cookie-token", "form-field", "header");
Microsoft.AspNetCore.Routing.FunctionalTests (7)
MinimalFormTests.cs (7)
52var tokens = antiforgery.GetAndStoreTokens(new DefaultHttpContext()); 112var tokens = antiforgery.GetAndStoreTokens(new DefaultHttpContext()); 473var tokens = antiforgery.GetAndStoreTokens(new DefaultHttpContext()); 532var tokens = antiforgery.GetAndStoreTokens(new DefaultHttpContext()); 584var tokens = antiforgery.GetAndStoreTokens(new DefaultHttpContext()); 636var tokens = antiforgery.GetAndStoreTokens(new DefaultHttpContext()); 685var tokens = antiforgery.GetAndStoreTokens(new DefaultHttpContext());
MinimalFormSample (1)
Program.cs (1)
18var token = antiforgery.GetAndStoreTokens(context);