Skip to content

Commit

Permalink
feat: get all claims (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
morigs committed Aug 30, 2022
1 parent 0e7949b commit fca6cf9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/oidc/introspection.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ func (i *introspectionResponse) GetClaim(key string) interface{} {
return i.claims[key]
}

func (i *introspectionResponse) GetClaims() map[string]interface{} {
return i.claims
}

func (i *introspectionResponse) SetActive(active bool) {
i.Active = active
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/oidc/userinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type UserInfo interface {
UserInfoPhone
GetAddress() UserInfoAddress
GetClaim(key string) interface{}
GetClaims() map[string]interface{}
}

type UserInfoProfile interface {
Expand Down Expand Up @@ -173,6 +174,10 @@ func (u *userinfo) GetClaim(key string) interface{} {
return u.claims[key]
}

func (u *userinfo) GetClaims() map[string]interface{} {
return u.claims
}

func (u *userinfo) SetSubject(sub string) {
u.Subject = sub
}
Expand Down

0 comments on commit fca6cf9

Please sign in to comment.