Class SessionCSRFCheckAttribute
Decorates controller classes or actions that need to check CSRF token on POST against the user session
Inherited Members
System.Attribute.Equals(System.Object)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetHashCode()
System.Attribute.IsDefaultAttribute()
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Module, System.Type)
System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.Match(System.Object)
System.Attribute.TypeId
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Azos.Wave.Mvc
Assembly: Azos.Wave.dll
Syntax
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = false, AllowMultiple = true)]
public sealed class SessionCSRFCheckAttribute : ActionFilterAttribute
Constructors
SessionCSRFCheckAttribute()
Declaration
public SessionCSRFCheckAttribute()
SessionCSRFCheckAttribute(String)
Declaration
public SessionCSRFCheckAttribute(string tokenName)
Parameters
Type | Name | Description |
---|---|---|
System.String | tokenName |
SessionCSRFCheckAttribute(String, Boolean, Int32)
Declaration
public SessionCSRFCheckAttribute(string tokenName, bool onlyExistingSession, int order)
Parameters
Type | Name | Description |
---|---|---|
System.String | tokenName | |
System.Boolean | onlyExistingSession | |
System.Int32 | order |
Fields
DEFAULT_TOKEN_NAME
Declaration
public const string DEFAULT_TOKEN_NAME = "__CSRFToken"
Field Value
Type | Description |
---|---|
System.String |
Properties
OnlyExistingSession
Declaration
public bool OnlyExistingSession { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
TokenName
Declaration
public string TokenName { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
ActionInvocationFinally(Controller, WorkContext, String, MethodInfo, Object[], ref Object)
Declaration
protected override void ActionInvocationFinally(Controller controller, WorkContext work, string action, MethodInfo method, object[] args, ref object result)
Parameters
Type | Name | Description |
---|---|---|
Controller | controller | |
WorkContext | work | |
System.String | action | |
System.Reflection.MethodInfo | method | |
System.Object[] | args | |
System.Object | result |
Overrides
AfterActionInvocation(Controller, WorkContext, String, MethodInfo, Object[], ref Object)
Declaration
protected override bool AfterActionInvocation(Controller controller, WorkContext work, string action, MethodInfo method, object[] args, ref object result)
Parameters
Type | Name | Description |
---|---|---|
Controller | controller | |
WorkContext | work | |
System.String | action | |
System.Reflection.MethodInfo | method | |
System.Object[] | args | |
System.Object | result |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
BeforeActionInvocation(Controller, WorkContext, String, MethodInfo, Object[], ref Object)
Declaration
protected override bool BeforeActionInvocation(Controller controller, WorkContext work, string action, MethodInfo method, object[] args, ref object result)
Parameters
Type | Name | Description |
---|---|---|
Controller | controller | |
WorkContext | work | |
System.String | action | |
System.Reflection.MethodInfo | method | |
System.Object[] | args | |
System.Object | result |
Returns
Type | Description |
---|---|
System.Boolean |