Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type User ¶
type User struct { Id primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` UserId uint64 `json:"id,omitempty" bson:"id, omitempty"` Username string `json:"username,omitempty" bson:"username, omitempty"` DisplayName string `json:"displayname,omitempty" bson:"displayname,omitempty` Icon string `json:"icon,omitempty" bson:"icon,omitempty` PublicKey string `json:"publickey,omitempty", bson:"publickey,omitempty"` // Challenge string `json:"challenge,omitempty" bson:"challenge,omitempty"` // SessionData webauthn.SessionData `json:"sessionData,omitempty" bson:"sessionData,omitempty"` Credentials []webauthn.Credential `json:"credentials" bson:"credentials"` }
func GetNewUser ¶
func GetNewUser() User
func GetUserOrCreate ¶
func (*User) AddCredential ¶
func (u *User) AddCredential(credential webauthn.Credential)
AddCredential associates the credential to the user
func (User) WebAuthnCredentials ¶
func (u User) WebAuthnCredentials() []webauthn.Credential
func (User) WebAuthnDisplayName ¶
func (User) WebAuthnID ¶
func (User) WebAuthnIcon ¶
func (User) WebAuthnName ¶
Click to show internal directories.
Click to hide internal directories.