Class AuthorizeAttributeBase
Provides Dnn specific details for authorization filter.
Inheritance
System.Object
AuthorizeAttributeBase
Namespace: DotNetNuke.Web.Api
Assembly: DotNetNuke.Web.dll
Syntax
public abstract class AuthorizeAttributeBase : AuthorizationFilterAttribute
Methods
| Improve this Doc View SourceIsAnonymousAttributePresent(HttpActionContext)
Checks if the
Declaration
public static bool IsAnonymousAttributePresent(HttpActionContext actionContext)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpActionContext | actionContext | The HTTP action context. |
Returns
| Type | Description |
|---|---|
| System.Boolean | A value indicating whether the |
IsAuthorized(AuthFilterContext)
Tests if the request passes the authorization requirements.
Declaration
public abstract bool IsAuthorized(AuthFilterContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| AuthFilterContext | context | The auth filter context. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True when authorization is succesful. |
OnAuthorization(HttpActionContext)
Called by framework at start of Auth process, check if auth should be skipped and handles auth failure. Should rarely need to be overridden.
Declaration
public override void OnAuthorization(HttpActionContext actionContext)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpActionContext | actionContext | The HTTP action context. |
SkipAuthorization(HttpActionContext)
Skips this authorization step if anonymous attribute is applied, override if auth should never be skipped, or other conditions are required.
Declaration
protected virtual bool SkipAuthorization(HttpActionContext actionContext)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpActionContext | actionContext | The HTTP Action Context. |
Returns
| Type | Description |
|---|---|
| System.Boolean | A value indicating whether to skip the authorization. |