Table of Contents

Class SecureEndpointAttribute

Namespace
ToSic.Sxc.WebApi
Assembly
ToSic.Sxc.WebApi.dll

Attribute for WebApi controllers, which automatically decrypts encrypted POST payloads for Web API endpoints. Use this attribute on controller or methods to automatically decrypt incoming POST requests.

It will intercepts POST requests with JSON content, checks for encrypted data, and if present, decrypts the payload using the ToSic.Eav.Security.Encryption.AesHybridCryptographyService. It then deserializes the decrypted data into the expected parameter type and replaces the action arguments. If the payload is not encrypted, the request content remains unchanged.

See Network POST Body Encryption (new v19) for more information.

[PublicApi]
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method)]
public class SecureEndpointAttribute : ActionFilterAttribute, _Attribute
Inheritance
object
Attribute
FilterAttribute
ActionFilterAttribute
SecureEndpointAttribute
Implements

Remarks

  • Introduced in version 19.00.