private string GetStatusMessage(CollectResponse collectResponse, BankIdLoginOptions unprotectedLoginOptions, BankIdSupportedDevice detectedDevice) { var authPersonalIdentityNumberProvided = PersonalIdentityNumberProvided(unprotectedLoginOptions); var accessedFromMobileDevice = detectedDevice.DeviceType == BankIdSupportedDeviceType.Mobile; var usingQrCode = unprotectedLoginOptions.UseQrCode; var messageShortName = _bankIdUserMessage.GetMessageShortNameForCollectResponse( collectResponse.GetCollectStatus(), collectResponse.GetCollectHintCode(), authPersonalIdentityNumberProvided, accessedFromMobileDevice, usingQrCode); var statusMessage = _bankIdUserMessageLocalizer.GetLocalizedString(messageShortName); return(statusMessage); }
private string GetStatusMessage(CollectResponse collectResponse, BankIdLoginOptions unprotectedLoginOptions, HttpRequest request) { var authPersonalIdentityNumberProvided = PersonalIdentityNumberProvided(unprotectedLoginOptions); var detectedDevice = _bankIdSupportedDeviceDetector.Detect(request.Headers["User-Agent"]); var accessedFromMobileDevice = detectedDevice.IsMobile; var messageShortName = _bankIdUserMessage.GetMessageShortNameForCollectResponse(collectResponse.GetCollectStatus(), collectResponse.GetCollectHintCode(), authPersonalIdentityNumberProvided, accessedFromMobileDevice); var statusMessage = _bankIdUserMessageLocalizer.GetLocalizedString(messageShortName); return(statusMessage); }