http-signatures
HTTP Signatures for Quarz, written in Quarz over its
standard library: signing an HTTP request with the Signature header of
draft-cavage-http-signatures-12,
verifying a request signed so, and the Digest header (RFC 3230) of the
body it covers.
# Cog.toml of an application
[dependencies]
HTTPSignatures = { git = "https://github.com/quarz-lang/http-signatures", tag = "v0.1.0" }
The API reference of the main branch is at https://http-signatures.api.quarz.dev.
Work in progress: the design is issue #1. Nothing is released yet.
License
MIT No Attribution: see LICENSE.
Classes and modules
HTTPSignaturesHTTPSignatures::BadSignatureThe signature does not verify with the key.HTTPSignatures::DigestThe Digest header of RFC 3230 with its SHA-256 algorithm: what a signature covers to cover the body.HTTPSignatures::DigestMismatchThe body does not match the Digest the signature covers, the body has no covered Digest, or the Digest has no SHA-256 entry.HTTPSignatures::ErrorThe root of every error this cog raises when it verifies a request: rescue HTTPSignatures::Error catches them all (and a server answers 401). A message names the reason; it never quotes a header's value, and quotes a name only once it is known to be a field name. (An argument a method cannot take is an ArgumentError, as anywhere.)HTTPSignatures::ExpiredThe signature is not valid now: its Date header is too far from now, created is in the future, or expires has passed.HTTPSignatures::MalformedSignatureThe signature's parameters do not parse: a parameter given twice, no keyId or signature, a signature that is not Base64, an empty or repeated name in headers, (created) or (expires) without its parameter or with an algorithm that does not allow it.HTTPSignatures::MissingHeaderA header the signature covers is not in the request, or one that must be covered is not.HTTPSignatures::MissingSignatureThe request has no Signature header, nor an Authorization header of the Signature scheme.HTTPSignatures::UnknownKeyNo key for the signature's keyId.HTTPSignatures::UnsupportedAlgorithmThe signature's algorithm is not one this cog verifies.HTTPSignatures::VerifiedWhat a verified request was signed with, and its body.