Skip to content

Commit 7daeb56

Browse files
authored
Add fido2Credentials to bitwarden ciphers (#4476)
2 parents bedfb68 + b68d255 commit 7daeb56

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

model/bitwarden/cipher.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ type LoginURI struct {
4848

4949
// LoginData is the encrypted data for a cipher with the login type.
5050
type LoginData struct {
51-
URIs []LoginURI `json:"uris,omitempty"`
52-
Username string `json:"username,omitempty"`
53-
Password string `json:"password,omitempty"`
54-
RevDate string `json:"passwordRevisionDate,omitempty"`
55-
TOTP string `json:"totp,omitempty"`
51+
URIs []LoginURI `json:"uris,omitempty"`
52+
Username string `json:"username,omitempty"`
53+
Password string `json:"password,omitempty"`
54+
RevDate string `json:"passwordRevisionDate,omitempty"`
55+
TOTP string `json:"totp,omitempty"`
56+
Fido interface{} `json:"fido2Credentials,omitempty"`
5657
}
5758

5859
// Field is used to store some additional fields.

web/bitwarden/ciphers.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ type loginResponse struct {
100100
Password *string `json:"Password"`
101101
RevDate *string `json:"PasswordRevisionDate"`
102102
TOTP *string `json:"Totp"`
103+
Fido interface{} `json:"fido2Credentials"`
103104
}
104105

105106
type fieldResponse struct {
@@ -212,6 +213,7 @@ func newCipherResponse(c *bitwarden.Cipher, setting *settings.Settings) *cipherR
212213
if c.Login.TOTP != "" {
213214
r.Login.TOTP = &c.Login.TOTP
214215
}
216+
r.Login.Fido = c.Login.Fido
215217
}
216218
case bitwarden.SecureNoteType:
217219
if c.Data != nil {

0 commit comments

Comments
 (0)