diff options
Diffstat (limited to 'modules/auth/user_form.go')
-rw-r--r-- | modules/auth/user_form.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/auth/user_form.go b/modules/auth/user_form.go index 1b00f62634..0c342df86a 100644 --- a/modules/auth/user_form.go +++ b/modules/auth/user_form.go @@ -211,3 +211,23 @@ type TwoFactorScratchAuthForm struct { func (f *TwoFactorScratchAuthForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { return validate(errs, ctx.Data, f, ctx.Locale) } + +// U2FRegistrationForm for reserving an U2F name +type U2FRegistrationForm struct { + Name string `binding:"Required"` +} + +// Validate valideates the fields +func (f *U2FRegistrationForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { + return validate(errs, ctx.Data, f, ctx.Locale) +} + +// U2FDeleteForm for deleting U2F keys +type U2FDeleteForm struct { + ID int64 `binding:"Required"` +} + +// Validate valideates the fields +func (f *U2FDeleteForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { + return validate(errs, ctx.Data, f, ctx.Locale) +} |