mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
21 lines
748 B
Go
21 lines
748 B
Go
package register
|
|
|
|
import (
|
|
"github.com/a-h/templ"
|
|
"github.com/go-webauthn/webauthn/protocol"
|
|
)
|
|
|
|
type LinkCredentialRequest struct {
|
|
Platform string `json:"platform"`
|
|
Handle string `json:"handle"`
|
|
DeviceModel string `json:"deviceModel"`
|
|
Architecture string `json:"architecture"`
|
|
Address string `json:"address"`
|
|
RegisterOptions protocol.PublicKeyCredentialCreationOptions `json:"registerOptions"`
|
|
}
|
|
|
|
func (r LinkCredentialRequest) GetCredentialOptions() string {
|
|
opts, _ := templ.JSONString(r.RegisterOptions)
|
|
return opts
|
|
}
|