Skip to content

Commit

Permalink
Add fido2Credentials to bitwarden ciphers (#4476)
Browse files Browse the repository at this point in the history
  • Loading branch information
nono authored Oct 16, 2024
2 parents bedfb68 + b68d255 commit 7daeb56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 6 additions & 5 deletions model/bitwarden/cipher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions web/bitwarden/ciphers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 7daeb56

Please sign in to comment.