Parse auth-param syntax from RFC7235
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.prettierrc
LICENSE
README.md
package.json
yarn.lock

README.md

auth-param-parser

Parses the auth-param syntax from RFC7235.

Install

yarn add auth-param-parser
# or
npm install auth-param-parser
import { stringifyAuthParams, parseAuthParams } from "auth-param-parser";
# or
const { stringifyAuthParams, parseAuthParams } = require("auth-param-parser");

Usage

Parse

parseAuthParams(`foo="bar",foofoo="barbar"`);
{
	foo: "bar",
	foofoo: "barbar"
}

Stringify

stringifyAuthParams({
	foo: "bar",
	foofoo: "barbar"
});
foo="bar",foofoo="barbar"