mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Add EmailVerified to UserInfo
This commit is contained in:
parent
16cd09d175
commit
c62588f9bc
@ -194,16 +194,17 @@ type User struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Userinfo struct {
|
type Userinfo struct {
|
||||||
Sub string `json:"sub"`
|
Sub string `json:"sub"`
|
||||||
Iss string `json:"iss"`
|
Iss string `json:"iss"`
|
||||||
Aud string `json:"aud"`
|
Aud string `json:"aud"`
|
||||||
Name string `json:"preferred_username,omitempty"`
|
Name string `json:"preferred_username,omitempty"`
|
||||||
DisplayName string `json:"name,omitempty"`
|
DisplayName string `json:"name,omitempty"`
|
||||||
Email string `json:"email,omitempty"`
|
Email string `json:"email,omitempty"`
|
||||||
Avatar string `json:"picture,omitempty"`
|
EmailVerified bool `json:"email,omitempty"`
|
||||||
Address string `json:"address,omitempty"`
|
Avatar string `json:"picture,omitempty"`
|
||||||
Phone string `json:"phone,omitempty"`
|
Address string `json:"address,omitempty"`
|
||||||
Groups []string `json:"groups,omitempty"`
|
Phone string `json:"phone,omitempty"`
|
||||||
|
Groups []string `json:"groups,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ManagedAccount struct {
|
type ManagedAccount struct {
|
||||||
@ -757,6 +758,7 @@ func GetUserInfo(user *User, scope string, aud string, host string) *Userinfo {
|
|||||||
}
|
}
|
||||||
if strings.Contains(scope, "email") {
|
if strings.Contains(scope, "email") {
|
||||||
resp.Email = user.Email
|
resp.Email = user.Email
|
||||||
|
resp.EmailVerified = user.EmailVerified
|
||||||
}
|
}
|
||||||
if strings.Contains(scope, "address") {
|
if strings.Contains(scope, "address") {
|
||||||
resp.Address = user.Location
|
resp.Address = user.Location
|
||||||
|
Loading…
x
Reference in New Issue
Block a user