func (c *Config) Validate() error {
	if c.RelyingPartyName == "" {
		return fmt.Errorf("missing RelyingPartyName")
	}
	if c.AuthenticatorStore == nil {
		return fmt.Errorf("missing AuthenticatorStore")
	}
	if c.SessionKeyPrefixChallenge == "" {
		c.SessionKeyPrefixChallenge = defaultSessionKeyPrefixChallenge
	}
	if c.SessionKeyPrefixUserID == "" {
		c.SessionKeyPrefixUserID = defaultSessionKeyPrefixUserID
	}
	if c.Timeout == 0 {
		c.Timeout = 30000
	}
	return nil
}
Validate validates that all required fields in Config are set.
package webauthn
import "fmt"
var defaultSessionKeyPrefixChallenge = "webauthn.challenge"
var defaultSessionKeyPrefixUserID = "webauthn.user.id"
type Config struct {
	RelyingPartyName string
	RelyingPartyID string
	RelyingPartyOrigin string
	AuthenticatorStore AuthenticatorStore
	SessionKeyPrefixChallenge string
	SessionKeyPrefixUserID string
	Timeout uint
	Debug bool
}