mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/1Panel-dev/1Panel.git
synced 2026-09-21 00:24:12 +08: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
27 lines
482 B
Go
27 lines
482 B
Go
package passkey
|
|
|
|
import "github.com/go-webauthn/webauthn/webauthn"
|
|
|
|
type PasskeyUser struct {
|
|
ID []byte
|
|
Name string
|
|
DisplayName string
|
|
Credentials []webauthn.Credential
|
|
}
|
|
|
|
func (u PasskeyUser) WebAuthnID() []byte {
|
|
return u.ID
|
|
}
|
|
|
|
func (u PasskeyUser) WebAuthnName() string {
|
|
return u.Name
|
|
}
|
|
|
|
func (u PasskeyUser) WebAuthnDisplayName() string {
|
|
return u.DisplayName
|
|
}
|
|
|
|
func (u PasskeyUser) WebAuthnCredentials() []webauthn.Credential {
|
|
return u.Credentials
|
|
}
|