22 lines
506 B
Go
Raw Normal View History

2023-11-15 20:38:25 +01:00
package config
type WebAuthnConfig struct {
RelyingParty WebAuthnRelyingPartyConfig `yaml:"relyingParty"`
}
type WebAuthnRelyingPartyConfig struct {
ID string `yaml:"id"`
DisplayName string `yaml:"displayName"`
Origins []string `yaml:"origins"`
}
func NewDefaultWebAuthnConfig() WebAuthnConfig {
return WebAuthnConfig{
RelyingParty: WebAuthnRelyingPartyConfig{
ID: "localhost",
DisplayName: "WebAuthn",
Origins: []string{"http://localhost:3000"},
},
}
}