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

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