mirror of
https://github.com/passbolt/go-passbolt.git
synced 2025-09-13 14:29:09 +00:00
Add totp and password-description-totp Support
This commit is contained in:
parent
605db2b047
commit
8dbb07720d
2 changed files with 81 additions and 0 deletions
|
@ -22,6 +22,25 @@ type SecretDataTypePasswordAndDescription struct {
|
|||
Description string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
type SecretDataTOTP struct {
|
||||
Algorithm string `json:"algorithm"`
|
||||
SecretKey string `json:"secret_key"`
|
||||
Digits int `json:"digits"`
|
||||
Period int `json:"period"`
|
||||
}
|
||||
|
||||
// SecretDataTypeTOTP is the format a secret of resource type "totp" is stored in
|
||||
type SecretDataTypeTOTP struct {
|
||||
TOTP SecretDataTOTP `json:"totp"`
|
||||
}
|
||||
|
||||
// SecretDataTypePasswordDescriptionTOTP is the format a secret of resource type "password-description-totp" is stored in
|
||||
type SecretDataTypePasswordDescriptionTOTP struct {
|
||||
Password string `json:"password"`
|
||||
Description string `json:"description,omitempty"`
|
||||
TOTP SecretDataTOTP `json:"totp"`
|
||||
}
|
||||
|
||||
// GetSecret gets a Passbolt Secret
|
||||
func (c *Client) GetSecret(ctx context.Context, resourceID string) (*Secret, error) {
|
||||
err := checkUUIDFormat(resourceID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue