Documentation
    Preparing search index...

    Function EncryptedController

    • Encrypted controller.

      EncryptedController is an extension of the nest.Controller class decorator function who configures encryption password of the AES-128/192/256 algorithm. The encryption algorithm and password would be used by EncryptedRoute and EncryptedBody to encrypt the request and response body of the HTTP protocol.

      By the way, you can configure the encryption password in the global level by using EncryptedModule instead of the nest.Module in the module level. In that case, you don't need to use this EncryptedController more. Just use the nest.Controller without duplicated encryption password definitions.

      Of course, if you want to use different encryption password from the EncryptedModule, this EncryptedController would be useful again. Therefore, I recommend to use this EncryptedController decorator function only when you must configure different encryption password from the EncryptedModule.

      Parameters

      Returns ClassDecorator

      Class decorator

      Jeongho Nam - https://github.com/samchon

      contracts/common.md#principled-implementation The decorator stores the password as metadata on the class and then applies Nest's Controller(path), so the encrypted decorators can find the password by reading the class.

      contracts/common.md#clear-and-simple-design One decorator that composes a metadata write with the standard decorator.

      contracts/common.md#prohibited-implementation-shortcuts It uses Nest's public Controller decorator and the reflect metadata API.

      contracts/common.md#meaningful-documentation The comment states the password forms and the encrypted decorators it enables.

      contracts/portability.md#os-neutral-implementation Controller paths are HTTP routing metadata and passwords are in-memory values; neither is a native filesystem path.