Skip to content

Commit 2fdb8bd

Browse files
committed
Add docstring to validate-one-time-jwt
1 parent f69fc31 commit 2fdb8bd

File tree

1 file changed

+3
-1
lines changed
  • src/main/lrsql/admin/interceptors

1 file changed

+3
-1
lines changed

src/main/lrsql/admin/interceptors/jwt.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
(defn validate-jwt
4949
"Validate that the header JWT is valid (e.g. not expired and signed properly).
50-
If no-val? is true run an entirely separate decoding that gets the username
50+
If `no-val?` is true run an entirely separate decoding that gets the username
5151
and issuer claims, verifies a role and ensures the account if necessary."
5252
[secret leeway {:keys [no-val?] :as no-val-opts}]
5353
(interceptor
@@ -81,6 +81,8 @@
8181
:body {:error "Unauthorized JSON Web Token!"}}))))}))
8282

8383
(defn validate-one-time-jwt
84+
"Validate one-time JWTs. Checks that they are not expired and are signed
85+
properly just like regular JWTs, then automatically revoke them."
8486
[secret leeway]
8587
(interceptor
8688
{:name ::validate-one-time-jwt

0 commit comments

Comments
 (0)