// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
namespace Microsoft.AspNetCore.Mvc
{
///
/// A filter that skips antiforgery token validation.
///
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class IgnoreAntiforgeryTokenAttribute : Attribute, IAntiforgeryPolicy, IOrderedFilter
{
///
/// Gets the order value for determining the order of execution of filters. Filters execute in
/// ascending numeric value of the property.
///
///
///
/// Filters are executed in an ordering determined by an ascending sort of the property.
///
///
/// The default Order for this attribute is 1000 because it must run after any filter which does authentication
/// or login in order to allow them to behave as expected (ie Unauthenticated or Redirect instead of 400).
///
///
/// Look at for more detailed info.
///
///
public int Order { get; set; } = 1000;
}
}