Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

toAuthHeader

import { toAuthHeader } from "https://raw.githubusercontent.com/snsinfu/deno-oauth-1.0a/main/mod.ts";

Composes HTTP Authorization header.

const params = client.sign("GET", "https://api.example.com/profile", {
  token: { key: "spMmUxWb", secret: "SbovVfkxHTwcmupb" },
});
const auth = toAuthHeader(params);
console.log("Authorization:", auth);
function toAuthHeader(params: SignedOAuthParams, realm?: string): string;
§
toAuthHeader(params: SignedOAuthParams, realm?: string): string
[src]

§Parameters

§
  • OAuth protocol parameters with signature.
§
realm?: string optional
[src]
  • Optional realm parameter attached to the header.

§Return Type

§
string
[src]

The content of OAuth Authorization header. The parameters are sorted as described in the RFC.