fix: add authorizations to userinfo
This commit is contained in:
parent
21dfd6c22e
commit
727efe61f4
1 changed files with 4 additions and 0 deletions
|
@ -14,6 +14,8 @@ type Userinfo struct {
|
||||||
UserinfoPhone
|
UserinfoPhone
|
||||||
Address *UserinfoAddress
|
Address *UserinfoAddress
|
||||||
|
|
||||||
|
Authorizations []string
|
||||||
|
|
||||||
claims map[string]interface{}
|
claims map[string]interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,6 +97,7 @@ func (i *Userinfo) MarshalJSON() ([]byte, error) {
|
||||||
j := new(jsonUserinfo)
|
j := new(jsonUserinfo)
|
||||||
j.Subject = i.Subject
|
j.Subject = i.Subject
|
||||||
j.setUserinfo(*i)
|
j.setUserinfo(*i)
|
||||||
|
j.Authorizations = i.Authorizations
|
||||||
return json.Marshal(j)
|
return json.Marshal(j)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,6 +114,7 @@ type jsonUserinfo struct {
|
||||||
jsonUserinfoEmail
|
jsonUserinfoEmail
|
||||||
jsonUserinfoPhone
|
jsonUserinfoPhone
|
||||||
JsonUserinfoAddress *jsonUserinfoAddress `json:"address,omitempty"`
|
JsonUserinfoAddress *jsonUserinfoAddress `json:"address,omitempty"`
|
||||||
|
Authorizations []string `json:"authorizations,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (j *jsonUserinfo) setUserinfo(i Userinfo) {
|
func (j *jsonUserinfo) setUserinfo(i Userinfo) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue