***

title: hasBasicAuth
slug: /reference/typescript/agents/configuration/auth-handler/has-basic-auth
description: Check whether Basic authentication is configured.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Check whether HTTP Basic authentication is configured on this handler.

## **Parameters**

None.

## **Returns**

`boolean` -- `true` if basic auth credentials have been set.

## **Example**

```typescript {7}
import { AuthHandler } from '@signalwire/sdk';

const auth = new AuthHandler({
  basicAuth: ['admin', 'secret'],
});

console.log(auth.hasBasicAuth()); // true
```