Liking cljdoc? Tell your friends :D

jose.jws


(header compact)

Returns the unverified compact JWS header as a Clojure map.

Returns the unverified compact JWS header as a Clojure map.
sourceraw docstring

signclj

(sign key payload-value)
(sign key payload-value opts)

Signs a string or byte-array payload and returns a compact JWS string.

Signs a string or byte-array payload and returns a compact JWS string.
sourceraw docstring

sign-jsonclj

(sign-json key-or-signers payload-value opts)

Signs flattened or general JWS JSON with protected and unprotected headers.

Signs flattened or general JWS JSON with protected and unprotected headers.
sourceraw docstring

verifyclj

(verify key compact)
(verify key compact opts)

Verifies a compact JWS and returns {:payload string :payload-bytes bytes :header map}.

:alg or :algs is required and constrains accepted algorithms. :typ and :cty require matching headers. :crit names understood critical headers. Pass {:algs :any} to unsafely accept any signed algorithm supported by the key. alg:none is always rejected.

Verifies a compact JWS and returns {:payload string :payload-bytes bytes :header map}.

:alg or :algs is required and constrains accepted algorithms. :typ and :cty
require matching headers. :crit names understood critical headers. Pass
{:algs :any} to unsafely accept any signed algorithm supported by the key.
alg:none is always rejected.
sourceraw docstring

verify-detachedclj

(verify-detached key compact payload)
(verify-detached key compact payload opts)

Verifies a detached compact JWS with an out-of-band payload.

Accepts the same required algorithm policy and optional header policy as verify.

Verifies a detached compact JWS with an out-of-band payload.

Accepts the same required algorithm policy and optional header policy as verify.
sourceraw docstring

verify-jsonclj

(verify-json keys json)
(verify-json keys json opts)

Parses and verifies every signature in flattened or general JWS JSON.

Parses and verifies every signature in flattened or general JWS JSON.
sourceraw docstring

verify-with-jwksclj

(verify-with-jwks source compact)
(verify-with-jwks source compact opts)

Selects a verification key from a JWKS source, then verifies a compact JWS.

Selects a verification key from a JWKS source, then verifies a compact JWS.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close