Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/esm/http/util.js>parseBasicAuth

A JavaScript extension package for building strong and modern applications.
Latest
function parseBasicAuth
import { parseBasicAuth } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/http/util.js";

Parses the Authorization header with the Basic scheme.

Examples

Example 1

import { parseBasicAuth } from "@ayonli/jsext/http";

const auth = parseBasicAuth("Basic cm9vdDpwYSQkdzByZA==");
console.log(auth);
// { username: "root", password: "pa$$w0rd" }