Skip to content

Allow nbf and nnc to be null #63

Description

@bgins

Summary

Problem

ts-ucan does not allow nbf and nnc to be null.

Impact

ts-ucan reports an invalid payload when either of these fields are null.

Solution

Allow the fields to be null when validating payloads.

The fields are checked here:

ts-ucan/src/types.ts

Lines 122 to 123 in 978dfd2

&& (!util.hasProp(obj, "nbf") || typeof obj.nbf === "number")
&& (!util.hasProp(obj, "nnc") || typeof obj.nnc === "string")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions