package jws

  1. Overview
  2. Docs
Implementation of JWS (RFC7515) with Jsont and mirage-crypto

Install

dune-project
 Dependency

Authors

Maintainers

Sources

jws-0.0.2.tbz
sha256=eea7319ae84c3649b4c72cd59f6308fa62f23bb51b41efb8af4a3a097dd71c3d
sha512=d27b80a04bd67641ca6ceff37d145491c6783cf1b6edac6f04dbc3bce1081e9378d8f07bc7412eb136e788c8ecdc2fa0a2f27e259c32f94fe90eb0aa88a5fb0f

doc/jws.jwt/Jwt/Claims/index.html

Module Jwt.ClaimsSource

Sourceval empty : t
Sourceval iss : string -> t -> t

Set the "iss" (issuer) claim.

Sourceval sub : string -> t -> t

Set the "sub" (subject) claim.

Sourceval aud : string list -> t -> t

Set the "aud" (audience) claim as a single string.

Sourceval exp : float -> t -> t

Set the "exp" (expiration time) claim as a epoch date (seconds since epoch)

Sourceval nbf : float -> t -> t

Set the "nbf" (not before) claim as a epoch date (seconds since epoch).

Sourceval iat : float -> t -> t

Set the "iat" (issued at) claim as a epoch date (seconds since epoch).

Sourceval jti : string -> t -> t

Set the "jti" (JWT ID) claim.

Sourceval add : string -> 'a Jsont.t -> 'a -> t -> t

add key codec value claims sets a custom claim using a Jsont.t codec. For example:

  Claims.empty |> Claims.add "admin" Jsont.bool true