2024-08-23 17:04:19 +02:00
|
|
|
package dto
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/go-webauthn/webauthn/protocol"
|
2025-02-05 18:08:01 +01:00
|
|
|
datatype "github.com/pocket-id/pocket-id/backend/internal/model/types"
|
2024-08-23 17:04:19 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type WebauthnCredentialDto struct {
|
|
|
|
|
ID string `json:"id"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
CredentialID string `json:"credentialID"`
|
|
|
|
|
AttestationType string `json:"attestationType"`
|
|
|
|
|
Transport []protocol.AuthenticatorTransport `json:"transport"`
|
|
|
|
|
|
|
|
|
|
BackupEligible bool `json:"backupEligible"`
|
|
|
|
|
BackupState bool `json:"backupState"`
|
|
|
|
|
|
2024-11-11 18:00:15 +01:00
|
|
|
CreatedAt datatype.DateTime `json:"createdAt"`
|
2024-08-23 17:04:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type WebauthnCredentialUpdateDto struct {
|
|
|
|
|
Name string `json:"name" binding:"required,min=1,max=30"`
|
|
|
|
|
}
|