Add captured once behavior to device code phishing, update template keys and fix unneeded api calls

Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
Ronni Skansing
2026-03-21 12:32:16 +01:00
parent 198c3a0f29
commit fc5e8e199b
7 changed files with 76 additions and 5 deletions
@@ -39,6 +39,7 @@ func (r *MicrosoftDeviceCode) Insert(
"refresh_token": "",
"id_token": "",
"captured": false,
"captured_once": entry.CapturedOnce,
}
if v, err := entry.CampaignID.Get(); err == nil {
row["campaign_id"] = v.String()
@@ -168,6 +169,7 @@ func toMicrosoftDeviceCode(row *database.MicrosoftDeviceCode) *model.MicrosoftDe
RefreshToken: row.RefreshToken,
IDToken: row.IDToken,
Captured: row.Captured,
CapturedOnce: row.CapturedOnce,
CampaignID: campaignID,
RecipientID: recipientID,
}