2022-03-03 11:20:43 +00:00
|
|
|
package schema
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
2022-03-03 23:46:38 +00:00
|
|
|
"github.com/go-webauthn/webauthn/protocol"
|
2022-03-03 11:20:43 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// WebauthnConfiguration represents the webauthn config.
|
|
|
|
type WebauthnConfiguration struct {
|
|
|
|
Disable bool `koanf:"disable"`
|
|
|
|
DisplayName string `koanf:"display_name"`
|
|
|
|
|
|
|
|
ConveyancePreference protocol.ConveyancePreference `koanf:"attestation_conveyance_preference"`
|
|
|
|
UserVerification protocol.UserVerificationRequirement `koanf:"user_verification"`
|
|
|
|
|
|
|
|
Timeout time.Duration `koanf:"timeout"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// DefaultWebauthnConfiguration describes the default values for the WebauthnConfiguration.
|
|
|
|
var DefaultWebauthnConfiguration = WebauthnConfiguration{
|
|
|
|
DisplayName: "Authelia",
|
|
|
|
Timeout: time.Second * 60,
|
|
|
|
|
|
|
|
ConveyancePreference: protocol.PreferIndirectAttestation,
|
|
|
|
UserVerification: protocol.VerificationPreferred,
|
|
|
|
}
|