jm-basic-auth-credentials

1.0.0 • Public • Published

jm-basic-auth-credentials

Get credentials from basic authorization header.

Installation

$ npm install jm-basic-auth-credentials

Example

//http authorization header for 'foo:bar'
const header = 'Basic Zm9vOmJhcg=='

const getCredentials = require('jm-basic-auth-credentials')
const {username, password} = getCredentials(header)

//username is now 'foo', password is 'bar'

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    2

Package Sidebar

Install

npm i jm-basic-auth-credentials

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • jakubmrozek