hasApiKeyAuth

View as MarkdownOpen in Claude

Check whether API key authentication is configured on this handler.

Parameters

None.

Returns

booleantrue if an API key has been set.

Example

1import { AuthHandler } from '@signalwire/sdk';
2
3const auth = new AuthHandler({
4 apiKey: 'my-api-key',
5});
6
7console.log(auth.hasApiKeyAuth()); // true