authenticateUser method
Implementation
Future<User?> authenticateUser(
String apiKey,
String customerId,
String externalUserId,
String companyId,
) async {
try {
final result = await dio.post(
'${Config.url}/users/auth',
data: {
'externalUserId': externalUserId,
'externalCompanyId': companyId,
},
options: Options(
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
"x-api-key": apiKey,
"x-customer": customerId,
},
),
);
return User.fromJson(result.data);
} catch (e) {
return null;
}
}