Exploit databaseDownload repository ZIP
GH-562a516151f045835c0ee477b90de486
barrersoftware/opencode-secure
Sources for CVE-2026-22812
6 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files8
barrersoftware/opencode-secureRevision 806a6c7399a1
- ↑..Parent directory
- auth.gen.ts
- bodySerializer.gen.ts
- params.gen.ts
- pathSerializer.gen.ts
- queryKeySerializer.gen.ts
- serverSentEvents.gen.ts
- types.gen.ts
- utils.gen.ts
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
packages/sdk/js/src/v2/gen/core/auth.gen.ts
TypeScript · 849 bytes// This file is auto-generated by @hey-api/openapi-ts
export type AuthToken = string | undefined
export interface Auth {
/**
* Which part of the request do we use to send the auth?
*
* @default 'header'
*/
in?: "header" | "query" | "cookie"
/**
* Header or query parameter name.
*
* @default 'Authorization'
*/
name?: string
scheme?: "basic" | "bearer"
type: "apiKey" | "http"
}
export const getAuthToken = async (
auth: Auth,
callback: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken,
): Promise<string | undefined> => {
const token = typeof callback === "function" ? await callback(auth) : callback
if (!token) {
return
}
if (auth.scheme === "bearer") {
return `Bearer ${token}`
}
if (auth.scheme === "basic") {
return `Basic ${btoa(token)}`
}
return token
}