mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 10:45:47 +08:00
feat: fix incorrect preferred_username field mapping in OIDC (#1697)
This commit is contained in:
parent
5b3202cc89
commit
b45c49d3a4
@ -108,8 +108,8 @@ func (idp *CasdoorIdProvider) GetToken(code string) (*oauth2.Token, error) {
|
|||||||
|
|
||||||
type CasdoorUserInfo struct {
|
type CasdoorUserInfo struct {
|
||||||
Id string `json:"sub"`
|
Id string `json:"sub"`
|
||||||
Name string `json:"name"`
|
Name string `json:"preferred_username,omitempty"`
|
||||||
DisplayName string `json:"preferred_username"`
|
DisplayName string `json:"name"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
AvatarUrl string `json:"picture"`
|
AvatarUrl string `json:"picture"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
|
@ -61,8 +61,8 @@ func (idp *CustomIdProvider) GetToken(code string) (*oauth2.Token, error) {
|
|||||||
|
|
||||||
type CustomUserInfo struct {
|
type CustomUserInfo struct {
|
||||||
Id string `json:"sub"`
|
Id string `json:"sub"`
|
||||||
Name string `json:"name"`
|
Name string `json:"preferred_username,omitempty"`
|
||||||
DisplayName string `json:"preferred_username"`
|
DisplayName string `json:"name"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
AvatarUrl string `json:"picture"`
|
AvatarUrl string `json:"picture"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user