/**
 * Shared authentication utilities.
 *
 * Provides common types and helpers used across both JWT and Supabase
 * authentication middleware to eliminate duplication.
 *
 * @module services/cloud/auth/auth.utils
 */
// ---------------------------------------------------------------------------
// Shared Helpers
// ---------------------------------------------------------------------------
/**
 * Extract the Bearer token from an Authorization header.
 *
 * @param req - Express request
 * @returns Token string or null if no valid Bearer token found
 */
export function extractBearerToken(req) {
    const header = req.headers.authorization;
    if (!header || !header.startsWith('Bearer '))
        return null;
    return header.slice(7);
}
//# sourceMappingURL=auth.utils.js.map