Clova v0.2.0 Clova.Validator View Source
Validates the HTTP request body against the signaturecek
header and provided app_id
.
CEK requests are signed by the server. This module verifies the signature using the published public key. If the signature is invalid, the connection state is set to 403 Forbidden and the plug pipeline is halted.
Usage:
plug Clova.Validator, app_id: "com.example.my_extension"
Options
:app_id
- The application ID as specified in the Clova Developer Center. All requests must contain this ID in the request body. If this option is not provided, the app ID validity is not checked.:force_signature_valid
- forces the plug to consider the signature to be valid. This is intended for use in development, because only requests signed by the CEK server will validate against the default public key.:public_key
- override the public key used by this plug. This can be used during testing and development to validate requests generated with the corresponding private key. Alternatievely if the CEK server changes its public key, this can be used to override the default key used by this module until an updated version of this module is available.
Link to this section Summary
Link to this section Functions
Callback implementation for Plug.call/2
.
Callback implementation for Plug.init/1
.