Documentation
¶
Overview ¶
Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Index ¶
- Variables
- func CheckPass(ctx context.Context, pwHash []byte, passwd []byte) bool
- func IsTimerExpired(tm Timer, expiry time.Duration) bool
- func ParseTimeZone(tz string) (*model.TimeZone, error)
- func TxnFunc(ctx context.Context, db model.PgxHandle, dbfn func(pgx.Tx) error) errs.Error
- type Credentialer
- type EventUpdateValues
- type FailIfCheckFunc
- type Options
- type Pagination
- type PasswdUpdate
- type Service
- func (s *Service) AddEventItem(ctx context.Context, userID int, refID model.EventRefID, description string) (*model.EventItem, errs.Error)
- func (s *Service) AddFavorite(ctx context.Context, userID int, refID model.EventRefID) (*model.Event, errs.Error)
- func (s *Service) ArchiveOldEvents(ctx context.Context) error
- func (s *Service) CreateEvent(ctx context.Context, user *model.User, name string, description string, ...) (*model.Event, errs.Error)
- func (s *Service) DeleteAllNotifications(ctx context.Context, userID int) errs.Error
- func (s *Service) DeleteEarmark(ctx context.Context, userID int, earmark *model.Earmark) errs.Error
- func (s *Service) DeleteEarmarkByRefID(ctx context.Context, userID int, refID model.EarmarkRefID) errs.Error
- func (s *Service) DeleteEvent(ctx context.Context, userID int, refID model.EventRefID) errs.Error
- func (s *Service) DeleteNotification(ctx context.Context, userID int, refID model.NotificationRefID) errs.Error
- func (s *Service) DeleteUser(ctx context.Context, userID int) errs.Error
- func (s *Service) DeleteUserCredential(ctx context.Context, user *model.User, refID model.CredentialRefID) errs.Error
- func (s *Service) DisableRemindersWithNotification(ctx context.Context, email string, suppressionReason string) errs.Error
- func (s *Service) GetApiKeyByUser(ctx context.Context, userID int) (*model.ApiKey, errs.Error)
- func (s *Service) GetEarmark(ctx context.Context, refID model.EarmarkRefID) (*model.Earmark, errs.Error)
- func (s *Service) GetEarmarkByEventItemID(ctx context.Context, eventItemID int) (*model.Earmark, errs.Error)
- func (s *Service) GetEarmarks(ctx context.Context, userID int, archived bool) ([]*model.Earmark, errs.Error)
- func (s *Service) GetEarmarksByEventID(ctx context.Context, eventID int) ([]*model.Earmark, errs.Error)
- func (s *Service) GetEarmarksCount(ctx context.Context, userID int) (*model.BifurcatedRowCounts, errs.Error)
- func (s *Service) GetEarmarksPaginated(ctx context.Context, userID int, limit, offset int, archived bool) ([]*model.Earmark, *Pagination, errs.Error)
- func (s *Service) GetEvent(ctx context.Context, refID model.EventRefID) (*model.Event, errs.Error)
- func (s *Service) GetEventByID(ctx context.Context, ID int) (*model.Event, errs.Error)
- func (s *Service) GetEventItem(ctx context.Context, eventItemRefID model.EventItemRefID) (*model.EventItem, errs.Error)
- func (s *Service) GetEventItemByID(ctx context.Context, eventItemID int) (*model.EventItem, errs.Error)
- func (s *Service) GetEventItemsByEvent(ctx context.Context, refID model.EventRefID) ([]*model.EventItem, errs.Error)
- func (s *Service) GetEventItemsByEventID(ctx context.Context, eventID int) ([]*model.EventItem, errs.Error)
- func (s *Service) GetEventItemsByIDs(ctx context.Context, eventItemIDs []int) ([]*model.EventItem, errs.Error)
- func (s *Service) GetEventItemsCount(ctx context.Context, eventIDs []int) ([]*model.EventItemCount, errs.Error)
- func (s *Service) GetEvents(ctx context.Context, userID int, archived bool) ([]*model.Event, errs.Error)
- func (s *Service) GetEventsByIDs(ctx context.Context, eventIDs []int) ([]*model.Event, errs.Error)
- func (s *Service) GetEventsComingSoonPaginated(ctx context.Context, userID int, limit, offset int) ([]*model.Event, *Pagination, errs.Error)
- func (s *Service) GetEventsCount(ctx context.Context, userID int) (*model.BifurcatedRowCounts, errs.Error)
- func (s *Service) GetEventsPaginated(ctx context.Context, userID int, limit, offset int, archived bool) ([]*model.Event, *Pagination, errs.Error)
- func (s *Service) GetFavoriteByUserEvent(ctx context.Context, userID int, eventID int) (*model.Favorite, errs.Error)
- func (s *Service) GetFavoriteEvents(ctx context.Context, userID int, archived bool) ([]*model.Event, errs.Error)
- func (s *Service) GetFavoriteEventsCount(ctx context.Context, userID int) (*model.BifurcatedRowCounts, errs.Error)
- func (s *Service) GetFavoriteEventsPaginated(ctx context.Context, userID int, limit, offset int, archived bool) ([]*model.Event, *Pagination, errs.Error)
- func (s *Service) GetNotifications(ctx context.Context, userID int) ([]*model.Notification, errs.Error)
- func (s *Service) GetNotificationsCount(ctx context.Context, userID int) (int, errs.Error)
- func (s *Service) GetNotificationsPaginated(ctx context.Context, userID int, limit, offset int) ([]*model.Notification, *Pagination, errs.Error)
- func (s *Service) GetUser(ctx context.Context, refID model.UserRefID) (*model.User, errs.Error)
- func (s *Service) GetUserByApiKey(ctx context.Context, token string) (*model.User, errs.Error)
- func (s *Service) GetUserByEmail(ctx context.Context, email string) (*model.User, errs.Error)
- func (s *Service) GetUserByID(ctx context.Context, ID int) (*model.User, errs.Error)
- func (s *Service) GetUserCredentialByRefID(ctx context.Context, userID int, refID model.CredentialRefID) (*model.UserCredential, errs.Error)
- func (s *Service) GetUserCredentialCountByUser(ctx context.Context, userID int) (int, errs.Error)
- func (s *Service) GetUserCredentialsByUser(ctx context.Context, userID int) ([]*model.UserCredential, errs.Error)
- func (s *Service) GetUserPWResetByRefID(ctx context.Context, refID model.UserPWResetRefID) (*model.UserPWReset, errs.Error)
- func (s *Service) GetUserVerifyByRefID(ctx context.Context, refID model.UserVerifyRefID) (*model.UserVerify, errs.Error)
- func (s *Service) GetUsersByIDs(ctx context.Context, userIDs []int) ([]*model.User, errs.Error)
- func (s *Service) NewApiKey(ctx context.Context, userID int) (*model.ApiKey, errs.Error)
- func (s *Service) NewApiKeyIfNotExists(ctx context.Context, userID int) (*model.ApiKey, errs.Error)
- func (s *Service) NewEarmark(ctx context.Context, user *model.User, eventItemID int, note string) (*model.Earmark, errs.Error)
- func (s *Service) NewNotification(ctx context.Context, userID int, message string) (*model.Notification, errs.Error)
- func (s *Service) NewUser(ctx context.Context, email, name string, rawPass []byte) (*model.User, errs.Error)
- func (s *Service) NewUserCredential(ctx context.Context, userID int, keyName string, credential []byte) (*model.UserCredential, errs.Error)
- func (s *Service) NewUserPWReset(ctx context.Context, userID int) (*model.UserPWReset, errs.Error)
- func (s *Service) NewUserVerify(ctx context.Context, userID int) (*model.UserVerify, errs.Error)
- func (s *Service) NotifyUsersPendingEvents(ctx context.Context, mailer mail.MailSender, tplContainer resources.TGetter, ...) error
- func (s *Service) RemoveEventItem(ctx context.Context, userID int, eventItemRefID model.EventItemRefID, ...) errs.Error
- func (s *Service) RemoveFavorite(ctx context.Context, userID int, refID model.EventRefID) errs.Error
- func (s *Service) SetUserVerified(ctx context.Context, user *model.User, verifier *model.UserVerify) errs.Error
- func (s *Service) UpdateEvent(ctx context.Context, userID int, refID model.EventRefID, ...) errs.Error
- func (s *Service) UpdateEventItem(ctx context.Context, userID int, refID model.EventItemRefID, ...) (*model.EventItem, errs.Error)
- func (s *Service) UpdateEventItemSorting(ctx context.Context, userID int, refID model.EventRefID, itemSortOrder []int) (*model.Event, errs.Error)
- func (s *Service) UpdateUser(ctx context.Context, user *model.User, euvs *UserUpdateValues) errs.Error
- func (s *Service) UpdateUserPWReset(ctx context.Context, user *model.User, upw *model.UserPWReset) errs.Error
- func (s *Service) UpdateUserSettings(ctx context.Context, userID int, pm *model.UserSettings) errs.Error
- func (s *Service) WebAuthnUserFrom(user *model.User) *WebAuthnUser
- type Servicer
- type Timer
- type UserUpdateValues
- type WebAuthnUser
Constants ¶
This section is empty.
Variables ¶
var ( EarmarkRefIDMatcher = reftag.NewMatcher[model.EarmarkRefID]() ParseEarmarkRefID = reftag.Parse[model.EarmarkRefID] )
var ( EventRefIDMatcher = reftag.NewMatcher[model.EventRefID]() EventRefIDFromBytes = reftag.FromBytes[model.EventRefID] ParseEventRefID = reftag.Parse[model.EventRefID] )
var ( ParseEventItemRefID = reftag.Parse[model.EventItemRefID] EventItemRefIDMatcher = reftag.NewMatcher[model.EventItemRefID]() EventItemRefIDFromBytes = reftag.FromBytes[model.EventItemRefID] )
var ( NotificationRefIDMatcher = reftag.NewMatcher[model.NotificationRefID]() NotificationRefIDFromBytes = reftag.FromBytes[model.NotificationRefID] ParseNotificationRefID = reftag.Parse[model.NotificationRefID] )
var ( ParseUserRefID = reftag.Parse[model.UserRefID] UserRefIDFromBytes = reftag.FromBytes[model.UserRefID] UserRefIDMatcher = reftag.NewMatcher[model.UserRefID]() )
var ( ApiKeyRefIDMatcher = reftag.NewMatcher[model.ApiKeyRefID]() ApiKeyRefIDFromBytes = reftag.FromBytes[model.ApiKeyRefID] ParseApiKeyRefID = reftag.Parse[model.ApiKeyRefID] )
var ( UserPWResetRefIDMatcher = reftag.NewMatcher[model.UserPWResetRefID]() UserPWResetRefIDFromBytes = reftag.FromBytes[model.UserPWResetRefID] ParseUserPWResetRefID = reftag.Parse[model.UserPWResetRefID] )
var ( UserVerifyRefIDMatcher = reftag.NewMatcher[model.UserVerifyRefID]() UserVerifyRefIDFromBytes = reftag.FromBytes[model.UserVerifyRefID] ParseUserVerifyRefID = reftag.Parse[model.UserVerifyRefID] )
var ( CredentialRefIDMatcher = reftag.NewMatcher[model.CredentialRefID]() CredentialRefIDFromBytes = reftag.FromBytes[model.CredentialRefID] ParseCredentialRefID = reftag.Parse[model.CredentialRefID] )
Functions ¶
Types ¶
type Credentialer ¶
type EventUpdateValues ¶
type EventUpdateValues struct { StartTime mo.Option[time.Time] `validate:"omitnil"` Name mo.Option[string] `validate:"omitnil,notblank"` Description mo.Option[string] `validate:"omitnil,notblank"` Tz mo.Option[string] `validate:"omitnil,timezone"` ItemSortOrder mo.Option[[]int] `validate:"omitnil,gt=0"` }
type FailIfCheckFunc ¶
type Pagination ¶
type PasswdUpdate ¶
type Service ¶
func (*Service) AddEventItem ¶
func (*Service) AddFavorite ¶
func (*Service) CreateEvent ¶
func (*Service) DeleteAllNotifications ¶
func (*Service) DeleteEarmark ¶
func (*Service) DeleteEarmarkByRefID ¶
func (*Service) DeleteEvent ¶
func (*Service) DeleteNotification ¶
func (*Service) DeleteUser ¶
func (*Service) DeleteUserCredential ¶
func (*Service) DisableRemindersWithNotification ¶
func (*Service) GetApiKeyByUser ¶
func (*Service) GetEarmark ¶
func (*Service) GetEarmarkByEventItemID ¶
func (*Service) GetEarmarks ¶
func (*Service) GetEarmarksByEventID ¶
func (*Service) GetEarmarksCount ¶
func (*Service) GetEarmarksPaginated ¶
func (*Service) GetEventByID ¶
func (*Service) GetEventItem ¶
func (*Service) GetEventItemByID ¶
func (*Service) GetEventItemsByEvent ¶
func (*Service) GetEventItemsByEventID ¶
func (*Service) GetEventItemsByIDs ¶
func (*Service) GetEventItemsCount ¶
func (*Service) GetEventsByIDs ¶
func (*Service) GetEventsComingSoonPaginated ¶
func (*Service) GetEventsCount ¶
func (*Service) GetEventsPaginated ¶
func (*Service) GetFavoriteByUserEvent ¶
func (*Service) GetFavoriteEvents ¶
func (*Service) GetFavoriteEventsCount ¶
func (*Service) GetFavoriteEventsPaginated ¶
func (*Service) GetNotifications ¶
func (*Service) GetNotificationsCount ¶
func (*Service) GetNotificationsPaginated ¶
func (s *Service) GetNotificationsPaginated( ctx context.Context, userID int, limit, offset int, ) ([]*model.Notification, *Pagination, errs.Error)
func (*Service) GetUserByApiKey ¶
func (*Service) GetUserByEmail ¶
func (*Service) GetUserByID ¶
func (*Service) GetUserCredentialByRefID ¶
func (s *Service) GetUserCredentialByRefID( ctx context.Context, userID int, refID model.CredentialRefID, ) (*model.UserCredential, errs.Error)
func (*Service) GetUserCredentialCountByUser ¶
func (*Service) GetUserCredentialsByUser ¶
func (*Service) GetUserPWResetByRefID ¶
func (s *Service) GetUserPWResetByRefID( ctx context.Context, refID model.UserPWResetRefID, ) (*model.UserPWReset, errs.Error)
func (*Service) GetUserVerifyByRefID ¶
func (s *Service) GetUserVerifyByRefID( ctx context.Context, refID model.UserVerifyRefID, ) (*model.UserVerify, errs.Error)
func (*Service) GetUsersByIDs ¶
func (*Service) NewApiKeyIfNotExists ¶
func (*Service) NewEarmark ¶
func (*Service) NewNotification ¶
func (*Service) NewUserCredential ¶
func (*Service) NewUserPWReset ¶
func (*Service) NewUserVerify ¶
func (*Service) NotifyUsersPendingEvents ¶
func (*Service) RemoveEventItem ¶
func (*Service) RemoveFavorite ¶
func (*Service) SetUserVerified ¶
func (*Service) UpdateEvent ¶
func (s *Service) UpdateEvent( ctx context.Context, userID int, refID model.EventRefID, euvs *EventUpdateValues, ) errs.Error
func (*Service) UpdateEventItem ¶
func (*Service) UpdateEventItemSorting ¶
func (*Service) UpdateUser ¶
func (*Service) UpdateUserPWReset ¶
func (*Service) UpdateUserSettings ¶
func (*Service) WebAuthnUserFrom ¶
func (s *Service) WebAuthnUserFrom(user *model.User) *WebAuthnUser
type Servicer ¶
type Servicer interface { GetEarmarksByEventID(ctx context.Context, eventID int) ([]*model.Earmark, errs.Error) GetEarmarkByEventItemID(ctx context.Context, eventItemID int) (*model.Earmark, errs.Error) GetEarmarksCount(ctx context.Context, userID int) (*model.BifurcatedRowCounts, errs.Error) GetEarmarksPaginated(ctx context.Context, userID int, limit, offset int, archived bool) ([]*model.Earmark, *Pagination, errs.Error) GetEarmarks(ctx context.Context, userID int, archived bool) ([]*model.Earmark, errs.Error) NewEarmark(ctx context.Context, user *model.User, eventItemID int, note string) (*model.Earmark, errs.Error) GetEarmark(ctx context.Context, refID model.EarmarkRefID) (*model.Earmark, errs.Error) DeleteEarmark(ctx context.Context, userID int, earmark *model.Earmark) errs.Error DeleteEarmarkByRefID(ctx context.Context, userID int, refID model.EarmarkRefID) errs.Error GetEvent(ctx context.Context, refID model.EventRefID) (*model.Event, errs.Error) GetEventByID(ctx context.Context, ID int) (*model.Event, errs.Error) GetEventsByIDs(ctx context.Context, eventIDs []int) ([]*model.Event, errs.Error) DeleteEvent(ctx context.Context, userID int, refID model.EventRefID) errs.Error UpdateEvent(ctx context.Context, userID int, refID model.EventRefID, euvs *EventUpdateValues) errs.Error UpdateEventItemSorting(ctx context.Context, userID int, refID model.EventRefID, itemSortOrder []int) (*model.Event, errs.Error) CreateEvent(ctx context.Context, user *model.User, name string, description string, when time.Time, tz string) (*model.Event, errs.Error) GetEventsPaginated(ctx context.Context, userID int, limit, offset int, archived bool) ([]*model.Event, *Pagination, errs.Error) GetEventsComingSoonPaginated(ctx context.Context, userID int, limit, offset int) ([]*model.Event, *Pagination, errs.Error) GetEventsCount(ctx context.Context, userID int) (*model.BifurcatedRowCounts, errs.Error) GetEvents(ctx context.Context, userID int, archived bool) ([]*model.Event, errs.Error) ArchiveOldEvents(ctx context.Context) error GetEventItemsCount(ctx context.Context, eventIDs []int) ([]*model.EventItemCount, errs.Error) GetEventItemsByEvent(ctx context.Context, refID model.EventRefID) ([]*model.EventItem, errs.Error) GetEventItemsByEventID(ctx context.Context, eventID int) ([]*model.EventItem, errs.Error) GetEventItemsByIDs(ctx context.Context, eventItemIDs []int) ([]*model.EventItem, errs.Error) GetEventItem(ctx context.Context, eventItemRefID model.EventItemRefID) (*model.EventItem, errs.Error) GetEventItemByID(ctx context.Context, eventItemID int) (*model.EventItem, errs.Error) RemoveEventItem(ctx context.Context, userID int, eventItemRefID model.EventItemRefID, failIfChecks FailIfCheckFunc[*model.EventItem]) errs.Error AddEventItem(ctx context.Context, userID int, refID model.EventRefID, description string) (*model.EventItem, errs.Error) UpdateEventItem(ctx context.Context, userID int, refID model.EventItemRefID, description string, failIfChecks FailIfCheckFunc[*model.EventItem]) (*model.EventItem, errs.Error) AddFavorite(ctx context.Context, userID int, refID model.EventRefID) (*model.Event, errs.Error) RemoveFavorite(ctx context.Context, userID int, refID model.EventRefID) errs.Error GetFavoriteEventsPaginated(ctx context.Context, userID int, limit, offset int, archived bool) ([]*model.Event, *Pagination, errs.Error) GetFavoriteEventsCount(ctx context.Context, userID int) (*model.BifurcatedRowCounts, errs.Error) GetFavoriteEvents(ctx context.Context, userID int, archived bool) ([]*model.Event, errs.Error) GetFavoriteByUserEvent(ctx context.Context, userID int, eventID int) (*model.Favorite, errs.Error) GetNotificationsCount(ctx context.Context, userID int) (int, errs.Error) GetNotificationsPaginated(ctx context.Context, userID int, limit, offset int) ([]*model.Notification, *Pagination, errs.Error) GetNotifications(ctx context.Context, userID int) ([]*model.Notification, errs.Error) DeleteNotification(ctx context.Context, userID int, refID model.NotificationRefID) errs.Error DeleteAllNotifications(ctx context.Context, userID int) errs.Error NewNotification(ctx context.Context, userID int, message string) (*model.Notification, errs.Error) GetUser(ctx context.Context, refID model.UserRefID) (*model.User, errs.Error) GetUserByEmail(ctx context.Context, email string) (*model.User, errs.Error) GetUserByID(ctx context.Context, ID int) (*model.User, errs.Error) GetUsersByIDs(ctx context.Context, userIDs []int) ([]*model.User, errs.Error) NewUser(ctx context.Context, email, name string, rawPass []byte) (*model.User, errs.Error) UpdateUser(ctx context.Context, user *model.User, euvs *UserUpdateValues) errs.Error UpdateUserSettings(ctx context.Context, userID int, pm *model.UserSettings) errs.Error DeleteUser(ctx context.Context, userID int) errs.Error GetApiKeyByUser(ctx context.Context, userID int) (*model.ApiKey, errs.Error) GetUserByApiKey(ctx context.Context, token string) (*model.User, errs.Error) NewApiKey(ctx context.Context, userID int) (*model.ApiKey, errs.Error) NewApiKeyIfNotExists(ctx context.Context, userID int) (*model.ApiKey, errs.Error) NotifyUsersPendingEvents(ctx context.Context, mailer mail.MailSender, tplContainer resources.TGetter, siteBaseUrl string) error GetUserPWResetByRefID(ctx context.Context, refID model.UserPWResetRefID) (*model.UserPWReset, errs.Error) NewUserPWReset(ctx context.Context, userID int) (*model.UserPWReset, errs.Error) UpdateUserPWReset(ctx context.Context, user *model.User, upw *model.UserPWReset) errs.Error GetUserVerifyByRefID(ctx context.Context, refID model.UserVerifyRefID) (*model.UserVerify, errs.Error) NewUserVerify(ctx context.Context, userID int) (*model.UserVerify, errs.Error) SetUserVerified(ctx context.Context, user *model.User, verifier *model.UserVerify) errs.Error GetUserCredentialByRefID(ctx context.Context, userID int, refID model.CredentialRefID) (*model.UserCredential, errs.Error) GetUserCredentialsByUser(ctx context.Context, userID int) ([]*model.UserCredential, errs.Error) GetUserCredentialCountByUser(ctx context.Context, userID int) (int, errs.Error) DeleteUserCredential(ctx context.Context, user *model.User, refID model.CredentialRefID) errs.Error NewUserCredential(ctx context.Context, userID int, keyName string, credential []byte) (*model.UserCredential, errs.Error) WebAuthnUserFrom(user *model.User) *WebAuthnUser DisableRemindersWithNotification(ctx context.Context, email string, suppressionReason string) errs.Error }
Servicer ...
type UserUpdateValues ¶
type WebAuthnUser ¶
func (*WebAuthnUser) AddCredential ¶
func (u *WebAuthnUser) AddCredential(keyName string, credential *webauthn.Credential) error
func (*WebAuthnUser) WebAuthnCredentials ¶
func (u *WebAuthnUser) WebAuthnCredentials() []webauthn.Credential
WebAuthnCredentials provides the list of Credential objects owned by the user.
func (*WebAuthnUser) WebAuthnDisplayName ¶
func (u *WebAuthnUser) WebAuthnDisplayName() string
WebAuthnDisplayName provides the name attribute of the user account during registration and is a human-palatable name for the user account, intended only for display. For example, "Alex Müller" or "田中倫". The Relying Party SHOULD let the user choose this, and SHOULD NOT restrict the choice more than necessary.
Specification: §5.4.3. User Account Parameters for Credential Generation (https://www.w3.org/TR/webauthn/#dom-publickeycredentialuserentity-displayname)
func (*WebAuthnUser) WebAuthnID ¶
func (u *WebAuthnUser) WebAuthnID() []byte
WebAuthnID provides the user handle of the user account. A user handle is an opaque byte sequence with a maximum size of 64 bytes, and is not meant to be displayed to the user.
To ensure secure operation, authentication and authorization decisions MUST be made on the basis of this id member, not the displayName nor name members. See Section 6.1 of [RFC8266].
It's recommended this value is completely random and uses the entire 64 bytes.
Specification: §5.4.3. User Account Parameters for Credential Generation (https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-id)
func (*WebAuthnUser) WebAuthnName ¶
func (u *WebAuthnUser) WebAuthnName() string
WebAuthnName provides the name attribute of the user account during registration and is a human-palatable name for the user account, intended only for display. For example, "Alex Müller" or "田中倫". The Relying Party SHOULD let the user choose this, and SHOULD NOT restrict the choice more than necessary.
Specification: §5.4.3. User Account Parameters for Credential Generation (https://w3c.github.io/webauthn/#dictdef-publickeycredentialuserentity)
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package mockservice is a generated GoMock package.
|
Package mockservice is a generated GoMock package. |