> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # validateBasicAuth > Override to add custom basic-auth validation logic. Lifecycle hook for custom basic-auth validation. The default implementation returns `true`. Subclasses can override this to add secondary validation logic (e.g., database lookups, external identity providers). > **Warning** > > This hook is defined but **not yet called** by the built-in Hono `basicAuth` > middleware. The middleware currently validates credentials directly against the > stored username/password pair. Overriding this method will have no effect on > request authentication in the current SDK version. It is reserved for future > integration. ## **Parameters** **`username`** `string` — required Username extracted from the incoming request's `Authorization` header. --- **`password`** `string` — required Password extracted from the incoming request's `Authorization` header. --- ## **Returns** `boolean | Promise` -- `true` if the credentials are valid, `false` to reject the request. ## **Example** ```typescript {9} import { AgentBase } from '@signalwire/sdk'; class SecureAgent extends AgentBase { constructor() { super({ name: 'assistant', route: '/assistant' }); this.setPromptText('You are a helpful assistant.'); } override async validateBasicAuth( username: string, password: string, ): Promise { // Custom validation against an external user store const response = await fetch('https://auth.example.com/verify', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ username, password }), }); return response.ok; } } const agent = new SecureAgent(); await agent.serve(); ``` > Override to add custom basic-auth validation logic.