profile.go 548 B

1234567891011121314151617181920
  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. }
  13. // String returns a formatted string representation of the user profile.
  14. func (p UserProfile) String() string {
  15. return fmt.Sprintf(`Key=%s ; ID=%s ; Username=%s`, p.Key, p.ID, p.Username)
  16. }