From b68d2551e1ce97d8eff5745c96c48a56d7fc6f31 Mon Sep 17 00:00:00 2001 From: Bruno Michel Date: Wed, 16 Oct 2024 11:15:29 +0200 Subject: [PATCH] Add fido2Credentials to bitwarden ciphers --- model/bitwarden/cipher.go | 11 ++++++----- web/bitwarden/ciphers.go | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/model/bitwarden/cipher.go b/model/bitwarden/cipher.go index dcf6c554cb4..5d608d07c0d 100644 --- a/model/bitwarden/cipher.go +++ b/model/bitwarden/cipher.go @@ -48,11 +48,12 @@ type LoginURI struct { // LoginData is the encrypted data for a cipher with the login type. type LoginData struct { - URIs []LoginURI `json:"uris,omitempty"` - Username string `json:"username,omitempty"` - Password string `json:"password,omitempty"` - RevDate string `json:"passwordRevisionDate,omitempty"` - TOTP string `json:"totp,omitempty"` + URIs []LoginURI `json:"uris,omitempty"` + Username string `json:"username,omitempty"` + Password string `json:"password,omitempty"` + RevDate string `json:"passwordRevisionDate,omitempty"` + TOTP string `json:"totp,omitempty"` + Fido interface{} `json:"fido2Credentials,omitempty"` } // Field is used to store some additional fields. diff --git a/web/bitwarden/ciphers.go b/web/bitwarden/ciphers.go index 98f985e5e92..b45c8a65a80 100644 --- a/web/bitwarden/ciphers.go +++ b/web/bitwarden/ciphers.go @@ -100,6 +100,7 @@ type loginResponse struct { Password *string `json:"Password"` RevDate *string `json:"PasswordRevisionDate"` TOTP *string `json:"Totp"` + Fido interface{} `json:"fido2Credentials"` } type fieldResponse struct { @@ -212,6 +213,7 @@ func newCipherResponse(c *bitwarden.Cipher, setting *settings.Settings) *cipherR if c.Login.TOTP != "" { r.Login.TOTP = &c.Login.TOTP } + r.Login.Fido = c.Login.Fido } case bitwarden.SecureNoteType: if c.Data != nil {