getSecureAuthHeaders method
Get authentication headers from native code (async, more secure)
Implementation
Future<Map<String, String>> getSecureAuthHeaders() async {
final nativeHeaders = await _nativeCore.getAuthHeaders();
// For backward compatibility, also include API key as Bearer token
// The backend might expect it in Authorization header
final apiKey = nativeHeaders['X-Api-Key'] ?? '';
return {
...nativeHeaders,
'Authorization': 'Bearer $apiKey',
'Content-Type': 'application/json',
'User-Agent': 'OnairosFlutter/1.0.0',
};
}