Test utility functions for use in writing tests against ring servers that have the ring-jwt middleware. Not designed for use in production code.
Test utility functions for use in writing tests against ring servers that have the ring-jwt middleware. Not designed for use in production code.
(add-jwt-token req claims alg-opts)
Sets the Authorization header on the specified request as a JWT-encoded token based on the given claims and algorithm.
Sets the Authorization header on the specified request as a JWT-encoded token based on the given claims and algorithm.
Encodes the given claims as a JWT using the given arguments as a basis.
Encodes the given claims as a JWT using the given arguments as a basis.
(generate-hmac-secret)
Generates a random string to use as a HMAC secret.
Generates a random string to use as a HMAC secret.
(generate-jwk-response key-id public-key)
Creates the JWK response for an RS256 public key with the key id. This should be returned by your JWK endpoint in tests
Creates the JWK response for an RS256 public key with the key id. This should be returned by your JWK endpoint in tests
(generate-key-pair alg & {:keys [key-size]})
Generates a private/public key pair based on the specified cryptographic algorithm.
Generates a private/public key pair based on the specified cryptographic algorithm.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close