Skip to content

digest-auth 1.1.0

Install from the command line:
Learn more about npm packages
$ npm install @flocasts/digest-auth@1.1.0
Install via package.json:
"@flocasts/digest-auth": "1.1.0"

About this version

Digest Authentication

This repo exists to add support for digest authentication when using the Axios HTTP client. Adding support for other HTTP clients is possible as well!

Installation

npm i @flocasts/digest-auth

Usage (with Axios)

import axios from 'axios';
import { AxiosDigest } from '@flocasts/digest-auth';

const axiosDigest = new AxiosDigest('<username>', '<passwd>', axios);

const result = await axiosDigest.get('http://localhost:3000/test');

Testing

Using the concurrently package, we are able to spin up a test server to test our digest-auth solution, and close the test server on completion of tests. To test, simply run:

npm run test

Supported Digest Algorithms

If the server your request is sent to uses an algorithm not supported, you will receive the error: algorithm '<algorithm>' not supported

  • [x] MD5
  • [ ] sha256
  • [ ] sha512

Supported HTTP Clients

Details


Assets

  • digest-auth-1.1.0.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0