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
/// </summary>
[AllowAnonymous]
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public class ErrorModel : PageModel
{
/// <summary>
@ -31,10 +32,9 @@ namespace Microsoft.AspNetCore.Authentication.AzureAD.UI.Internal
/// 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
/// </summary>
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public void OnGet()
{
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
/// </summary>
[AllowAnonymous]
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public class ErrorModel : PageModel
{
/// <summary>
@ -31,10 +32,9 @@ namespace Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Internal
/// 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
/// </summary>
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}
}
}