Utility functions for creating/handling JWTs and JWT claims.
Both access tokens and ID tokens.
Utility functions for creating/handling JWTs and JWT claims. Both access tokens and ID tokens.
(access-token-claims {:keys [issuer identity-id client-id now scope]
:or {now (System/currentTimeMillis)}})Generate JWT claims for an access token
Generate JWT claims for an access token
(at-exp now)(at-hash access-token hash-alg)Compute the at-hash claim, which is
base64url(leftmostHalf(hash(access-token)))
Compute the `at-hash` claim, which is base64url(leftmostHalf(hash(access-token)))
(expired? claims)(iat now)(id-exp now)(id-token-claims db
{:keys [issuer identity-id client-id now auth-time hash-alg
access-token scope]})Generate JWT claims for an id token
Generate JWT claims for an id token
(parse-verify db token)Lookup the JWK based on the key id (kid) in the token header, then check the signature, and return the claims map
Lookup the JWK based on the key id (kid) in the token header, then check the signature, and return the claims map
(update-at-claims claims {:keys [now]})(update-id-claims claims {:keys [now hash-alg access-token] :as opts})cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |