profile.go 567 B

123456789101112131415161718192021
  1. // SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
  2. // SPDX-License-Identifier: Apache-2.0
  3. package oauth2 // import "miniflux.app/v2/internal/oauth2"
  4. import (
  5. "fmt"
  6. )
  7. // UserProfile represents a user's profile retrieved from an OAuth2 provider.
  8. type UserProfile struct {
  9. Key string
  10. ID string
  11. Username string
  12. Groups []string
  13. }
  14. // String returns a formatted string representation of the user profile.
  15. func (p UserProfile) String() string {
  16. return fmt.Sprintf(`Key=%s ; ID=%s ; Username=%s`, p.Key, p.ID, p.Username)
  17. }