Nutritious Pumpkin Masses

    @nutshelllab/usurper
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0-1 • Public • Published

    Usurper

    Usurp a user identity by checking a header presence

    Usage

    Install it

    npm i usurper
    #OR
    yarn add usurper

    Use it

    const Usurper = require('usurper')
    
    //Optionnaly configure it
    Usurper.configure(options)
    
    const [success, identity] = Usurper(ctx.request.headers.authorization)
    const user = sucess && await findUser(identity)

    Options

    name description default
    disabled turn off usurper `process.env.USURPER_DISABLED === 'true'
    verbose Log in console usurped identity false

    Install

    npm i @nutshelllab/usurper

    DownloadsWeekly Downloads

    1

    Version

    1.0.0-1

    License

    ISC

    Unpacked Size

    4.19 kB

    Total Files

    6

    Last publish

    Collaborators

    • 7hanith
    • bluer4v3n
    • vblitz