func (d *Device) AddCredential(cred webauthn.Credential) {
	d.Credentials = append(d.Credentials, cred)
}
AddCredential associates the credential to the user.
nolint:gocritic
package device
import (
	"github.com/duo-labs/webauthn/protocol"
	"github.com/duo-labs/webauthn/webauthn"
	"github.com/trustbloc/edge-agent/pkg/restapi/common/store/user"
)
type Device struct {
	ID          string
	Name        string
	DisplayName string
	Credentials []webauthn.Credential
}
func NewDevice(usr *user.User) *Device {
	device := &Device{}
	device.ID = usr.Sub
	device.Name = usr.Name
	device.DisplayName = usr.FamilyName
	device.Credentials = []webauthn.Credential{}
	return device
}
func (d Device) WebAuthnID() []byte {
	return []byte(d.ID)
}
func (d Device) WebAuthnName() string {
	return d.Name
}
func (d Device) WebAuthnDisplayName() string {
	return d.DisplayName
}
func (d Device) WebAuthnIcon() string {
	return ""
}