hasBearerAuth

View as MarkdownOpen in Claude

Check whether Bearer token authentication is configured on this handler.

Parameters

None.

Returns

booleantrue if a bearer token has been set.

Example

import { AuthHandler } from '@signalwire/sdk';
const auth = new AuthHandler({
bearerToken: 'my-secret-token',
});
console.log(auth.hasBearerAuth()); // true