Release 0.4.1 with updated deps and code improvement

Use latest buddy library and clojure logging versions.
Use defonce on keystore atom to prevent binding of new atom to same symbol.
Signed-off-by: Snorre Magnus Davøen's avatarSnorre Magnus Davøen <snorre.davoen@nsd.no>
parent edb7fcb3
Pipeline #21533 passed with stage
in 53 seconds
......@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file. This change
## [Unreleased]
## [v0.4.1] - 2019-07-30
### Changed
- Use defonce to define keystore atom to prevent accidental redefinitions in upstream project's development
- Update dependencies to latest feature/patch versions
## [v0.4.0] - 2019-06-06
### Added
- New sign function to sign claims and generate JWTs based on private key in JWK
......@@ -39,7 +44,8 @@ All notable changes to this project will be documented in this file. This change
- Function `resolve-key` that fetches jwks keys and returns a PublicKey given the kid in the jwt header.
- Function `unsign` which tries to validate a jwt given a jwks URL and a jwt.
[Unreleased]: https://gitlab.nsd.no/clojure/clj-jwt/compare/v0.4.0...HEAD
[Unreleased]: https://gitlab.nsd.no/clojure/clj-jwt/compare/v0.4.1...HEAD
[v0.4.1]: https://gitlab.nsd.no/clojure/clj-jwt/compare/v0.4.0...v0.4.1
[v0.4.0]: https://gitlab.nsd.no/clojure/clj-jwt/compare/v0.3.2...v0.4.0
[v0.3.2]: https://gitlab.nsd.no/clojure/clj-jwt/compare/v0.3.1...v0.3.2
[v0.3.1]: https://gitlab.nsd.no/clojure/clj-jwt/compare/v0.3.0...v0.3.1
......
......@@ -5,7 +5,7 @@
A Clojure library to handle validation of JWTs and signing claims using JSON Web Keys.
```clojure
[no.nsd/clj-jwt "0.4.0"]
[no.nsd/clj-jwt "0.4.1"]
```
clj-jwt wraps some of [Buddy's](https://funcool.github.io/buddy-sign/latest/) functions for validating JWTs and signing claims.
......@@ -70,19 +70,8 @@ clojure -Adev:test
clojure -Adev:propertytest
```
You can start a REPL in the project to evaluate code. If you need an nREPL configure
a global tools deps alias in `~/.clojure/deps.edn`:
```clojure
{:aliases {:nREPL {:extra-deps {nrepl/nrepl {:mvn/version "0.4.5"}}
:main-opts ["-m" "nrepl.cmdline"]}}}
```
Then run:
```bash
clojure -Adev:nREPL
```
You can start a REPL in the project to evaluate code.
For editor integration see [clojure guides - editor integrations](https://gitlab.nsd.no/clojure/guides/blob/master/editor.md).
### Installing 'work in progress' locally
......@@ -159,6 +148,7 @@ lein deploy
### Finally commit, push and tag release
Add a new changelog entry in the `CHANGELOG.md` file.
Commit the project.clj version bump, push it to the Gitlab repository, and tag
it. The tag message should describe the changes made, and the release notes can
link to the release in Nexus.
......
{:paths ["src" "resources"]
:deps {buddy/buddy-core {:mvn/version "1.5.0"}
buddy/buddy-sign {:mvn/version "3.0.0"}
:deps {buddy/buddy-core {:mvn/version "1.6.0"}
buddy/buddy-sign {:mvn/version "3.1.0"}
org.clojure/data.json {:mvn/version "0.2.6"}
org.clojure/algo.generic {:mvn/version "0.1.3"}
org.clojure/tools.logging {:mvn/version "0.4.1"}
org.clojure/tools.logging {:mvn/version "0.5.0"}
invetica/uri {:mvn/version "0.5.0"}}
:aliases {:dev {:extra-paths ["test" "test-resources"]
......
(defproject no.nsd/clj-jwt "0.4.0"
(defproject no.nsd/clj-jwt "0.4.1"
:description "A Clojure library to fetch json web keys and validate json web tokens. Wraps Buddy."
:url "https://gitlab.nsd.no/clojure/clj-jwt"
:license {:name "Eclipse Public License"
......
......@@ -116,10 +116,11 @@
(catch Exception e (do (log/error "Could not fetch jwks keys")
false))))
(def keystore
"Atom to hold the public and private keys used for signature validation in memory for
caching purposes. The atom holds a clojure map with kid -> key pairs. Each key is a
clojure map containing a :public-key and optionally a :private-key."
;; Atom to hold the public and private keys used for signature validation in memory for
;; caching purposes. The atom holds a clojure map with kid -> key pairs. Each key is a
;; clojure map containing a :public-key and optionally a :private-key.
(defonce keystore
(atom {}))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment