feat: get all claims (#209)
This commit is contained in:
parent
0e7949b1a0
commit
fca6cf9433
2 changed files with 9 additions and 0 deletions
|
@ -140,6 +140,10 @@ func (i *introspectionResponse) GetClaim(key string) interface{} {
|
||||||
return i.claims[key]
|
return i.claims[key]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (i *introspectionResponse) GetClaims() map[string]interface{} {
|
||||||
|
return i.claims
|
||||||
|
}
|
||||||
|
|
||||||
func (i *introspectionResponse) SetActive(active bool) {
|
func (i *introspectionResponse) SetActive(active bool) {
|
||||||
i.Active = active
|
i.Active = active
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ type UserInfo interface {
|
||||||
UserInfoPhone
|
UserInfoPhone
|
||||||
GetAddress() UserInfoAddress
|
GetAddress() UserInfoAddress
|
||||||
GetClaim(key string) interface{}
|
GetClaim(key string) interface{}
|
||||||
|
GetClaims() map[string]interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
type UserInfoProfile interface {
|
type UserInfoProfile interface {
|
||||||
|
@ -173,6 +174,10 @@ func (u *userinfo) GetClaim(key string) interface{} {
|
||||||
return u.claims[key]
|
return u.claims[key]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (u *userinfo) GetClaims() map[string]interface{} {
|
||||||
|
return u.claims
|
||||||
|
}
|
||||||
|
|
||||||
func (u *userinfo) SetSubject(sub string) {
|
func (u *userinfo) SetSubject(sub string) {
|
||||||
u.Subject = sub
|
u.Subject = sub
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue