Apply attribute to page model rather than handler

This commit is contained in:
Pranav K 2018-06-20 10:46:20 -07:00
parent ee7d80881d
commit c6cc1ef6d6
2 changed files with 4 additions and 4 deletions

View File

@ -13,6 +13,7 @@ namespace Microsoft.AspNetCore.Authentication.AzureAD.UI.Internal
/// directly from your code.This API may change or be removed in future releases /// directly from your code.This API may change or be removed in future releases
/// </summary> /// </summary>
[AllowAnonymous] [AllowAnonymous]
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public class ErrorModel : PageModel public class ErrorModel : PageModel
{ {
/// <summary> /// <summary>
@ -31,7 +32,6 @@ namespace Microsoft.AspNetCore.Authentication.AzureAD.UI.Internal
/// This API supports infrastructure and is not intended to be used /// This API supports infrastructure and is not intended to be used
/// directly from your code.This API may change or be removed in future releases /// directly from your code.This API may change or be removed in future releases
/// </summary> /// </summary>
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public void OnGet() public void OnGet()
{ {
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;

View File

@ -13,6 +13,7 @@ namespace Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Internal
/// directly from your code.This API may change or be removed in future releases /// directly from your code.This API may change or be removed in future releases
/// </summary> /// </summary>
[AllowAnonymous] [AllowAnonymous]
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public class ErrorModel : PageModel public class ErrorModel : PageModel
{ {
/// <summary> /// <summary>
@ -31,7 +32,6 @@ namespace Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Internal
/// This API supports infrastructure and is not intended to be used /// This API supports infrastructure and is not intended to be used
/// directly from your code.This API may change or be removed in future releases /// directly from your code.This API may change or be removed in future releases
/// </summary> /// </summary>
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public void OnGet() public void OnGet()
{ {
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;