export function isRuntimeAuthTokenProvider(value) {
    return (typeof value === 'object' &&
        value !== null &&
        'provide' in value &&
        typeof value.provide === 'function');
}
export async function resolveRuntimeAuthToken(token) {
    if (typeof token === 'string') {
        return token;
    }
    if (isRuntimeAuthTokenProvider(token)) {
        const result = await token.provide?.();
        return typeof result === 'string' ? result : undefined;
    }
    return undefined;
}
//# sourceMappingURL=authToken.js.map