Socket
Book a DemoInstallSign in
Socket

@dalisoft/jwe

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dalisoft/jwe

JWE Helper for Auth building from scratch

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

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(payload: object, secret: string | any, options: object): 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

Keywords

auth

FAQs

Package last updated on 01 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts