2022-03-03 18:20:43 +07:00
|
|
|
package schema
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
2022-03-04 06:46:38 +07:00
|
|
|
"github.com/go-webauthn/webauthn/protocol"
|
2022-03-03 18:20:43 +07: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,
|
|
|
|
}
|