MCPcopy
hub / github.com/directus/directus / basicHeader

Function basicHeader

api/src/services/mcp-oauth/index.test.ts:3914–3916  ·  view source on GitHub ↗
(user: string, pass: string)

Source from the content-addressed store, hash-verified

3912 const secretHash = crypto.createHash('sha256').update(secret).digest('hex');
3913
3914 function basicHeader(user: string, pass: string): string {
3915 return `Basic ${Buffer.from(`${user}:${pass}`).toString('base64')}`;
3916 }
3917
3918 beforeEach(() => {
3919 service = new McpOAuthService({ knex: db, schema });

Callers 1

index.test.tsFile · 0.85

Calls 2

fromMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected