Skip to content

Commit

Permalink
fix: add authorizations to userinfo (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
livio-a committed Jul 9, 2020
1 parent b4c6e3b commit 2966355
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/oidc/userinfo.go
Expand Up @@ -14,6 +14,8 @@ type Userinfo struct {
UserinfoPhone
Address *UserinfoAddress

Authorizations []string

claims map[string]interface{}
}

Expand Down Expand Up @@ -95,6 +97,7 @@ func (i *Userinfo) MarshalJSON() ([]byte, error) {
j := new(jsonUserinfo)
j.Subject = i.Subject
j.setUserinfo(*i)
j.Authorizations = i.Authorizations
return json.Marshal(j)
}

Expand All @@ -111,6 +114,7 @@ type jsonUserinfo struct {
jsonUserinfoEmail
jsonUserinfoPhone
JsonUserinfoAddress *jsonUserinfoAddress `json:"address,omitempty"`
Authorizations []string `json:"authorizations,omitempty"`
}

func (j *jsonUserinfo) setUserinfo(i Userinfo) {
Expand Down

0 comments on commit 2966355

Please sign in to comment.