initial commit
This commit is contained in:
57
internal/pkg/oauth/linkedin/user.go
Normal file
57
internal/pkg/oauth/linkedin/user.go
Normal file
@@ -0,0 +1,57 @@
|
||||
package linkedin
|
||||
|
||||
type UserInfo struct {
|
||||
Id string `json:"id"`
|
||||
LocalizedFirstName string `json:"localizedFirstName"`
|
||||
LocalizedHeadline string `json:"localizedHeadline"`
|
||||
VanityName string `json:"vanityName"`
|
||||
LocalizedLastName string `json:"localizedLastName"`
|
||||
Firstname UserInfoFirstName `json:"firstName"`
|
||||
Lastname UserInfoLastName `json:"lastName"`
|
||||
Headline UserInfoHeadline `json:"headline"`
|
||||
ProfilePicture UserInfoProfilePicture `json:"profilePicture"`
|
||||
}
|
||||
|
||||
type UserInfoFirstName struct {
|
||||
Localized Localized `json:"localized"`
|
||||
PreferredLocale PreferredLocale `json:"preferredLocale"`
|
||||
}
|
||||
|
||||
type UserInfoLastName struct {
|
||||
Localized Localized `json:"localized"`
|
||||
PreferredLocale PreferredLocale `json:"preferredLocale"`
|
||||
}
|
||||
|
||||
type Localized struct {
|
||||
EnUS string `json:"en_US"`
|
||||
}
|
||||
|
||||
type PreferredLocale struct {
|
||||
Country string `json:"country"`
|
||||
Language string `json:"language"`
|
||||
}
|
||||
|
||||
type UserInfoHeadline struct {
|
||||
Localized Localized `json:"localized"`
|
||||
PreferredLocale PreferredLocale `json:"preferredLocale"`
|
||||
}
|
||||
|
||||
type UserInfoProfilePicture struct {
|
||||
DisplayImage string `json:"displayImage"`
|
||||
}
|
||||
|
||||
func (u UserInfo) ID() string {
|
||||
return u.Id
|
||||
}
|
||||
|
||||
func (u UserInfo) Email() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (u UserInfo) FirstName() string {
|
||||
return u.Firstname.Localized.EnUS
|
||||
}
|
||||
|
||||
func (u UserInfo) LastName() string {
|
||||
return u.Lastname.Localized.EnUS
|
||||
}
|
||||
Reference in New Issue
Block a user