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.
(create-rsa-jwk key-id rsa-public-key)
Creates the JKW response for an RS256 public key with the key id. This should be returned by your jwkEndpoint in tests
Creates the JKW response for an RS256 public key with the key id. This should be returned by your jwkEndpoint in tests
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-key-pair alg & [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