Create, sign and unsign (validate) iSHARE JWTs.
Create, sign and unsign (validate) iSHARE JWTs. See also: https://dev.ishare.eu/reference/ishare-jwt
(decode-header token)
Return header info from a signed JWT. Does not validate.
Return header info from a signed JWT. Does not validate.
(make-client-assertion {:ishare/keys [client-id server-id x5c private-key]})
Create a signed client assertion for requesting an access token.
Create a signed client assertion for requesting an access token. See https://dev.ishare.eu/reference/ishare-jwt
(make-jwt
{:keys [iat iss sub aud] :or {iat (seconds-since-unix-epoch)} :as claims}
private-key
x5c)
Generate JWT with provided claims
, signed with private-key
.
The JWT header is set with :alg as RS256, :typ "JWT" and :x5c
from x5c
(a vector of certificate strings). The first certificate
in x5c
should correspond to private-key
.
A few claims are generated if not provided:
:iat
-- the current time:exp
-- iat + 30 seconds:jti
-- a random UUID:nbf
-- iatGenerate JWT with provided `claims`, signed with `private-key`. The JWT header is set with :alg as RS256, :typ "JWT" and `:x5c` from `x5c` (a vector of certificate strings). The first certificate in `x5c` should correspond to `private-key`. A few claims are generated if not provided: - `:iat` -- the current time - `:exp` -- iat + 30 seconds - `:jti` -- a random UUID - `:nbf` -- iat https://dev.ishare.eu/reference/ishare-jwt
(unsign-client-assertion client-assertion)
Parse a signed client assertion. Returns parsed data or raises exception.
Raises an exception when client-assertion is not valid for any reason including expiration.
Does not check revocation status of certificates.
Parse a signed client assertion. Returns parsed data or raises exception. Raises an exception when client-assertion is not valid for any reason including expiration. Does not check revocation status of certificates.
(unsign-token token)
Parse a signed token. Returns parsed data or raises exception.
Raises an exception when token is not a valid iSHARE JWT for any reason, including expiration.
Does not check revocation status of certificates.
Parse a signed token. Returns parsed data or raises exception. Raises an exception when token is not a valid iSHARE JWT for any reason, including expiration. Does not check revocation status of certificates.
(x5c->first-public-key x5c)
Extract first public-key from x5c header.
Extract first public-key from x5c header.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close