1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-13 06:43:17 +00:00

log autofill events

This commit is contained in:
Kyle Spearrin
2019-07-22 15:50:59 -04:00
parent 0c75374c0f
commit f9547f158e
10 changed files with 33 additions and 20 deletions

View File

@@ -102,7 +102,8 @@ namespace Bit.iOS.Autofill
CheckLock(() => PerformSegue("setupSegue", this));
}
public void CompleteRequest(string username = null, string password = null, string totp = null)
public void CompleteRequest(string id = null, string username = null,
string password = null, string totp = null)
{
ServiceContainer.Reset();
@@ -125,6 +126,8 @@ namespace Bit.iOS.Autofill
UIPasteboard.General.String = totp;
}
var eventService = ServiceContainer.Resolve<IEventService>("eventService");
var task = eventService.CollectAsync(Bit.Core.Enums.EventType.Cipher_ClientAutofilled, id);
var cred = new ASPasswordCredential(username, password);
NSRunLoop.Main.BeginInvokeOnMainThread(() => ExtensionContext?.CompleteRequest(cred, null));
}
@@ -207,7 +210,7 @@ namespace Bit.iOS.Autofill
}
}
CompleteRequest(decCipher.Login.Username, decCipher.Login.Password, totpCode);
CompleteRequest(decCipher.Id, decCipher.Login.Username, decCipher.Login.Password, totpCode);
}
private void CheckLock(Action notLockedAction)