Wondering what’s next for npm?Check out our public roadmap! »

    @dalisoft/jwe

    0.0.3 • Public • Published

    JWE

    JWE Helper for Auth building from scratch

    Features

    • Fast
    • Zero-config
    • Well tested
    • Good security

    Import

    // ES6
    import { sign, verify, decode } from "@dalisoft/jwe";
     
    // or
     
    // CommonJS
    const JWE = require("@dalisoft/jwe");

    Example

    const { sign, verify, decode } = JWE;
     
    const token = await sign(payloadobject, secretstring | any, optionsobject)string;

    For more info see tests.

    Methods

    #sign(payload: object, secret: string | any, options: object): string

    Returns value of signed (+ maybe secured) token

    #verify(token: string, secret: string | any, options: object): object | null

    Returns value of signed (+ maybe secured) token

    #decode(token: string, secret: string | any, options: object): object | null

    Decodes value of signed (+ maybe secured) token without needing verifying signature

    License

    MIT

    Install

    npm i @dalisoft/jwe

    DownloadsWeekly Downloads

    0

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    6.88 kB

    Total Files

    9

    Last publish

    Collaborators

    • avatar