Documentation
¶
Index ¶
- Variables
- func Module() fx.Option
- type AAGUID
- type Config
- type Credential
- type CredentialID
- type Repository
- func (r *Repository) Create(ctx context.Context, model *credentialModel) error
- func (r *Repository) Delete(ctx context.Context, id int64, userID int64) error
- func (r *Repository) GetByCredentialID(ctx context.Context, credentialID []byte) (*Credential, error)
- func (r *Repository) GetByID(ctx context.Context, id int64) (*Credential, error)
- func (r *Repository) GetByUserID(ctx context.Context, userID int64) ([]Credential, error)
- func (r *Repository) UpdateName(ctx context.Context, id int64, userID int64, name string) error
- func (r *Repository) UpdateSignCount(ctx context.Context, id int64, signCount uint32) error
- type Service
- func (s *Service) BeginLogin(ctx context.Context) (*protocol.CredentialAssertion, error)
- func (s *Service) BeginRegistration(ctx context.Context, user *users.User) (*protocol.CredentialCreation, error)
- func (s *Service) DeleteCredential(ctx context.Context, id int64, userID int64) error
- func (s *Service) FinishLogin(ctx context.Context, body []byte) (*users.User, error)
- func (s *Service) FinishRegistration(ctx context.Context, user *users.User, body []byte) (*Credential, error)
- func (s *Service) GetCredentials(ctx context.Context, userID int64) ([]Credential, error)
- func (s *Service) RenameCredential(ctx context.Context, id int64, userID int64, name string) error
- type Transports
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCredentialNotFound = errors.New("credential not found") ErrSessionNotFound = errors.New("session not found") ErrDuplicateCredential = errors.New("credential already registered") ErrInvalidWebAuthnPayload = errors.New("invalid webauthn request payload") ErrUnexpectedType = errors.New("unexpected type") )
Functions ¶
Types ¶
type Credential ¶
type CredentialID ¶
type CredentialID []byte //nolint:recvcheck // String on value
func (CredentialID) Value ¶
func (c CredentialID) Value() (driver.Value, error)
Value implements driver.Valuer.
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *bun.DB) *Repository
func (*Repository) Create ¶
func (r *Repository) Create(ctx context.Context, model *credentialModel) error
func (*Repository) GetByCredentialID ¶
func (r *Repository) GetByCredentialID(ctx context.Context, credentialID []byte) (*Credential, error)
func (*Repository) GetByID ¶
func (r *Repository) GetByID(ctx context.Context, id int64) (*Credential, error)
func (*Repository) GetByUserID ¶
func (r *Repository) GetByUserID(ctx context.Context, userID int64) ([]Credential, error)
func (*Repository) UpdateName ¶
func (*Repository) UpdateSignCount ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) BeginLogin ¶
func (*Service) BeginRegistration ¶
func (*Service) DeleteCredential ¶
func (*Service) FinishLogin ¶
func (*Service) FinishRegistration ¶
func (*Service) GetCredentials ¶
type Transports ¶
type Transports []string
func (*Transports) Value ¶
func (t *Transports) Value() (driver.Value, error)
Value implements driver.Valuer.
Click to show internal directories.
Click to hide internal directories.