mirror of
https://github.com/bitwarden/server.git
synced 2025-04-21 04:55:08 -05:00
add sshKey data type
This commit is contained in:
parent
3fae927f77
commit
df93c23127
@ -1048,6 +1048,7 @@ public class CipherService : ICipherService
|
|||||||
CipherIdentityData identityData => JsonSerializer.Serialize(identityData),
|
CipherIdentityData identityData => JsonSerializer.Serialize(identityData),
|
||||||
CipherCardData cardData => JsonSerializer.Serialize(cardData),
|
CipherCardData cardData => JsonSerializer.Serialize(cardData),
|
||||||
CipherSecureNoteData noteData => JsonSerializer.Serialize(noteData),
|
CipherSecureNoteData noteData => JsonSerializer.Serialize(noteData),
|
||||||
|
CipherSSHKeyData sshKeyData => JsonSerializer.Serialize(sshKeyData),
|
||||||
_ => throw new ArgumentException("Unsupported cipher data type.", nameof(data))
|
_ => throw new ArgumentException("Unsupported cipher data type.", nameof(data))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -1060,6 +1061,7 @@ public class CipherService : ICipherService
|
|||||||
CipherType.Identity => JsonSerializer.Deserialize<CipherIdentityData>(cipher.Data),
|
CipherType.Identity => JsonSerializer.Deserialize<CipherIdentityData>(cipher.Data),
|
||||||
CipherType.Card => JsonSerializer.Deserialize<CipherCardData>(cipher.Data),
|
CipherType.Card => JsonSerializer.Deserialize<CipherCardData>(cipher.Data),
|
||||||
CipherType.SecureNote => JsonSerializer.Deserialize<CipherSecureNoteData>(cipher.Data),
|
CipherType.SecureNote => JsonSerializer.Deserialize<CipherSecureNoteData>(cipher.Data),
|
||||||
|
CipherType.SSHKey => JsonSerializer.Deserialize<CipherSSHKeyData>(cipher.Data),
|
||||||
_ => throw new ArgumentException("Unsupported cipher type.", nameof(cipher))
|
_ => throw new ArgumentException("Unsupported cipher type.", nameof(cipher))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user