see #9 Merge branch 'ShaneKilkelly-master'
This commit is contained in:
commit
e48d4b39e2
2 changed files with 2 additions and 2 deletions
|
@ -69,7 +69,7 @@
|
|||
([this key]
|
||||
(let [alg (-> this :header :alg keyword)]
|
||||
(cond
|
||||
(= :none alg) (= "" (:signature this))
|
||||
(= :none alg) (= "" key (:signature this))
|
||||
|
||||
(supported-algorithm? alg)
|
||||
(let [verify-fn (get-verify-fn alg)
|
||||
|
@ -88,4 +88,3 @@
|
|||
(->JWT (encoded-json->map header)
|
||||
(encoded-json->map claims)
|
||||
(or signature ""))))
|
||||
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
(fact "Plain JWT should be verified."
|
||||
(-> claim jwt verify) => true
|
||||
(-> claim jwt to-str str->jwt verify) => true
|
||||
(-> claim jwt to-str str->jwt (verify "foo")) => false
|
||||
(-> claim jwt (assoc :signature "foo") verify) => false)
|
||||
|
||||
(fact "HS256 signed JWT should be verified."
|
||||
|
|
Loading…
Reference in a new issue