ProtectAttribute

Namespace: ASPSecurityKit.ServiceStack
Assembly: ASPSecurityKit.ServiceStack.dll

Summary

A Service Stack request filter attribute that protects the associated service or endpoint by executing a strong security pipeline provided by ASPSecurityKit.

Constructors

#ctor(applyTo)

Summary

Initializes a new instance of the ProtectAttribute class.

Parameters
Name Type Description
applyTo ServiceStack.ApplyTo Determines to which http method call it applies.

#ctor()

Summary

Initializes a new instance of the ProtectAttribute class.

Parameters

This constructor has no parameters.

Properties

ValidateXss

Summary

Gets or sets a value indicating whether cross-site scripting (XSS) validation should be performed on the request DTO. The default is true.

Value

A Boolean value indicating whether cross-site scripting (XSS) validation should be performed on the request DTO.

Methods

Execute(req,res,requestDto)

Summary

Initializes and executes the ISecurityPipeline.

Parameters
Name Type Description
req ServiceStack.Web.IRequest The request.
res ServiceStack.Web.IResponse The response.
requestDto System.Object The request dto.
Remarks

This will run the pipeline synchronously. For asynchronous execution, you will need to initialize and call the pipeline ExecuteAsync manually inside a GlobalRequestFiltersAsync.