AdvantageCMS.Core.Common.BaseClasses Namespace
Advantage CSP

AdvantageApiAuthorizationAttribute Class

Custom authorization attribute for API security. This attribute dynamically applies an authorization filter based on the specified type.

Namespace:  AdvantageCSP.API
Assembly:  AdvantageCSP.API (in AdvantageCSP.API.dll)

Syntax


[AttributeUsageAttribute]
public class AdvantageApiAuthorizationAttribute : Attribute, 
	IAuthorizationFilter

Remarks


The controller's actions require the user to be authorized through the specified before they can access the content.

Examples


"MySecureContentController" would be an instance of AdvantageApiAuthorizeBase [AdvantageApiAuthorizationAttribute(typeof(MySecureContentController))] or [AdvantageApiAuthorization(typeof(MySecureContentController))]
C#
[AdvantageApiAuthorization(typeof(MySecureContentController))]
[RoutePrefix("api")]
public class MySecureContentController : AdvantageApiControllerBase
{
    // Controller actions here
}

Inheritance Hierarchy


Object
  Attribute
    AdvantageCSP.API..::..AdvantageApiAuthorizationAttribute