@@ -80,12 +80,12 @@ func (err errCallback) Error() string {
80
80
}
81
81
82
82
type userInfoResponse struct {
83
- Sub string `json:"sub"`
84
- Name string `json:"name"`
85
- Username string `json:"preferred_username"`
86
- Email string `json:"email"`
87
- Picture string `json:"picture"`
88
- Groups []string `json:"groups"`
83
+ Sub string `json:"sub"`
84
+ Name string `json:"name"`
85
+ PreferredUsername string `json:"preferred_username"`
86
+ Email string `json:"email"`
87
+ Picture string `json:"picture"`
88
+ Groups []string `json:"groups"`
89
89
}
90
90
91
91
// InfoOAuth manages request for userinfo endpoint
@@ -97,11 +97,11 @@ func InfoOAuth(ctx *context.Context) {
97
97
}
98
98
99
99
response := & userInfoResponse {
100
- Sub : fmt .Sprint (ctx .Doer .ID ),
101
- Name : ctx .Doer .FullName ,
102
- Username : ctx .Doer .Name ,
103
- Email : ctx .Doer .Email ,
104
- Picture : ctx .Doer .AvatarLink (ctx ),
100
+ Sub : fmt .Sprint (ctx .Doer .ID ),
101
+ Name : ctx .Doer .FullName ,
102
+ PreferredUsername : ctx .Doer .Name ,
103
+ Email : ctx .Doer .Email ,
104
+ Picture : ctx .Doer .AvatarLink (ctx ),
105
105
}
106
106
107
107
groups , err := oauth2_provider .GetOAuthGroupsForUser (ctx , ctx .Doer )
0 commit comments