login method
Logs in to the specified securityCheck
using the credentials
provided.
If an error occurs, an object of type MFResponse is returned.
Implementation
Future<MFResponse> login(
{@required String securityCheck, @required Map credentials}) async {
final Map response = await _channel.invokeMethod(
WLAUTHORIZATIONMANAGER_LOGIN, <String, dynamic>{
SECURITYCHECK: securityCheck,
CREDENTIALS: credentials
});
final MFResponse mfResponse = MFResponse(mfResponse: response);
if ((mfResponse.errorMsg?.isEmpty ?? true) ||
(mfResponse.errorCode?.isEmpty ?? true)) {
return mfResponse;
} else {
throw mfResponse;
}
}