PlugSignature.ConnTest (plug_signature v0.11.0) View Source
Helpers for testing HTTP signatures with Plug/Phoenix.
Link to this section Summary
Functions
Makes a signed request to a Phoenix endpoint.
Makes a signed request to a Phoenix endpoint.
Makes a signed request to a Phoenix endpoint.
Makes a signed request to a Phoenix endpoint.
Makes a signed request to a Phoenix endpoint.
Makes a signed request to a Phoenix endpoint.
Makes a signed request to a Phoenix endpoint.
Makes a signed request to a Phoenix endpoint.
Makes a signed request to a Phoenix endpoint.
Add an HTTP Digest header (RFC3230, section 4.3.2).
Adds an Authorization header with a signature. Requires a secret (RSA private key, EC private key or HMAC shared secret) and key ID.
Link to this section Functions
Makes a signed request to a Phoenix endpoint.
The last argument is a keyword list with signature options, with the
:key and :key_id options being mandatory. For other options, please
see with_signature/4.
Requires Phoenix.ConnTest.
Makes a signed request to a Phoenix endpoint.
The last argument is a keyword list with signature options, with the
:key and :key_id options being mandatory. For other options, please
see with_signature/4.
Requires Phoenix.ConnTest.
Makes a signed request to a Phoenix endpoint.
The last argument is a keyword list with signature options, with the
:key and :key_id options being mandatory. For other options, please
see with_signature/4.
Requires Phoenix.ConnTest.
Makes a signed request to a Phoenix endpoint.
The last argument is a keyword list with signature options, with the
:key and :key_id options being mandatory. For other options, please
see with_signature/4.
Requires Phoenix.ConnTest.
Makes a signed request to a Phoenix endpoint.
The last argument is a keyword list with signature options, with the
:key and :key_id options being mandatory. For other options, please
see with_signature/4.
Requires Phoenix.ConnTest.
Makes a signed request to a Phoenix endpoint.
The last argument is a keyword list with signature options, with the
:key and :key_id options being mandatory. For other options, please
see with_signature/4.
Requires Phoenix.ConnTest.
Makes a signed request to a Phoenix endpoint.
The last argument is a keyword list with signature options, with the
:key and :key_id options being mandatory. For other options, please
see with_signature/4.
Requires Phoenix.ConnTest.
Makes a signed request to a Phoenix endpoint.
The last argument is a keyword list with signature options, with the
:key and :key_id options being mandatory. For other options, please
see with_signature/4.
Requires Phoenix.ConnTest.
Makes a signed request to a Phoenix endpoint.
The last argument is a keyword list with signature options, with the
:key and :key_id options being mandatory. For other options, please
see with_signature/4.
Requires Phoenix.ConnTest.
Add an HTTP Digest header (RFC3230, section 4.3.2).
When the request body is passed in as a binary, a SHA-256 digest of the body is calculated and added as part of the header. Alternatively, a map of digest types and values may be provided.
Adds an Authorization header with a signature. Requires a secret (RSA private key, EC private key or HMAC shared secret) and key ID.
Options
:algorithms- the HTTP signature algorithms to be used; list with one or more of:"hs2019"(default)"rsa-sha256""rsa-sha1""ecdsa-sha256""hmac-sha256"The first algorithm in the list will be used to generate the signature (it is a list to allow the core set of configuration options to be shared withPlugSignaturein tests).
:headers- set the list of HTTP (pseudo) headers to sign; defaults to "(created)" (which is only valid when the algorithm is "hs2019"):request_target- explicitly set the request target; by default it is built from the Plug.Conn struct (method, request_path and query):age- shift the HTTP Date header and the signature's 'created' parameter by the given number of seconds into the past; defaults to 0:created- set the signature's 'created' parameter (overrides:age); set to a empty string to omit the 'created' parameter:date- set the HTTP Date header (overrides:age):expires_in- if set, adds an 'expires' parameter with a timestamp the given number of seconds in the future:expires- set the signature's 'expires' parameter (overrides:expires_in):key_id_override- override the value forkeyIdin the Authorization header:algorithm_override- override the value for the signature's 'algorithm' parameter in the Authorization header:signature_override- override the signature value sent in the Authorization header:headers_override- override the value for the signature's 'headers' parameter in the Authorization header:created_override- override the value for the signature's 'created' parameter in the Authorization header:expires_override- override the value for the signature's 'expires' parameter in the Authorization header