mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-10-09 08:00:27 +00:00
* feat: Add passkey authentication support with registration and login endpoints * style: Refactor import statements and improve button formatting in login and settings views * chore: Update dependencies in go.mod and go.sum, including adding go-webauthn and updating indirect dependencies * refactor: Consolidate passkey session management and update related structures for improved clarity and functionality * feat: Add passkey support in multiple languages with corresponding error messages and management options * feat: Implement passkey reset command and enhance internationalization support for passkey-related messages * refactor: Simplify login form structure by removing commented sections and unused passkey login function * fix: Update passkey failure messages across multiple languages to include SSL certificate verification instructions * chore: update go mod * refactor: Update passkey handling by consolidating status checks and renaming related fields for clarity * style: Format i18n file * refactor: Enhance passkey configuration checks
49 lines
1.3 KiB
Go
49 lines
1.3 KiB
Go
package dto
|
|
|
|
type CaptchaResponse struct {
|
|
CaptchaID string `json:"captchaID"`
|
|
ImagePath string `json:"imagePath"`
|
|
}
|
|
|
|
type UserLoginInfo struct {
|
|
Name string `json:"name"`
|
|
Token string `json:"token"`
|
|
MfaStatus string `json:"mfaStatus"`
|
|
}
|
|
|
|
type PasskeyBeginResponse struct {
|
|
SessionID string `json:"sessionId"`
|
|
PublicKey interface{} `json:"publicKey"`
|
|
}
|
|
|
|
type MfaRequest struct {
|
|
Title string `json:"title" validate:"required"`
|
|
Interval int `json:"interval" validate:"required"`
|
|
}
|
|
|
|
type MfaCredential struct {
|
|
Secret string `json:"secret" validate:"required"`
|
|
Code string `json:"code" validate:"required"`
|
|
Interval string `json:"interval" validate:"required"`
|
|
}
|
|
|
|
type Login struct {
|
|
Name string `json:"name" validate:"required"`
|
|
Password string `json:"password" validate:"required"`
|
|
Captcha string `json:"captcha"`
|
|
CaptchaID string `json:"captchaID"`
|
|
Language string `json:"language" validate:"required,oneof=zh en 'zh-Hant' ko ja ru ms 'pt-BR' tr 'es-ES'"`
|
|
}
|
|
|
|
type MFALogin struct {
|
|
Name string `json:"name" validate:"required"`
|
|
Password string `json:"password" validate:"required"`
|
|
Code string `json:"code" validate:"required"`
|
|
}
|
|
|
|
type SystemSetting struct {
|
|
IsDemo bool `json:"isDemo"`
|
|
Language string `json:"language"`
|
|
IsIntl bool `json:"isIntl"`
|
|
}
|