Given a list of UCANs, generate a dictionary.
The key will be in the form of ${resourceKey}:${resourceValue}
Try to decode a UCAN. Will throw if it fails.
The encoded UCAN to decode
Encode a UCAN.
The UCAN to encode
Encode the header of a UCAN.
The UcanHeader to encode
Encode the payload of a UCAN.
The UcanPayload to encode
Check if a UCAN is expired.
The UCAN to validate
Check if a UCAN is valid.
The decoded UCAN
Given a UCAN, lookup the root issuer.
Throws when given an improperly formatted UCAN. This could be a nested UCAN (ie. proof).
A UCAN.
The root issuer.
Generate UCAN signature.
Generated using TypeDoc
Create a UCAN, User Controlled Authorization Networks, JWT. This JWT can be used for authorization.
Header
alg
, Algorithm, the type of signature.typ
, Type, the type of this data structure, JWT.uav
, UCAN version.Payload
aud
, Audience, the ID of who it's intended for.exp
, Expiry, unix timestamp of when the jwt is no longer valid.iss
, Issuer, the ID of who sent this.nbf
, Not Before, unix timestamp of when the jwt becomes valid.prf
, Proof, an optional nested token with equal or greater privileges.ptc
, Potency, which rights come with the token.rsc
, Resource, the involved resource.