JWE
JWE Helper for Auth building from scratch
Features
- Fast
- Zero-config
- Well tested
- Good security
Import
// ES6; // or // CommonJSconst JWE = ;
Example
; ;
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