4
0

webauthn.go 503 B

1234567891011121314151617181920212223
  1. // SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
  2. // SPDX-License-Identifier: Apache-2.0
  3. package model // import "miniflux.app/v2/internal/model"
  4. import (
  5. "encoding/hex"
  6. "time"
  7. "github.com/go-webauthn/webauthn/webauthn"
  8. )
  9. type WebAuthnCredential struct {
  10. Credential webauthn.Credential
  11. Name string
  12. AddedOn *time.Time
  13. LastSeenOn *time.Time
  14. Handle []byte
  15. }
  16. func (s WebAuthnCredential) HandleEncoded() string {
  17. return hex.EncodeToString(s.Handle)
  18. }