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.1.tbz
sha256=6d853bcb579dc0e4ca3e2575d10fede2ae78ad55b061f8bda77338eb2983d18d
sha512=c836590b0ebe40b3f24b110ed0cfc02214e16913e40bb205ba2aadfc2ed31c883a5697a3a5297f95adb1ef4a40aa6d2aeabcc0138b8e2a795a3ee7facfcb7902

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