feat: get all claims (#209)
This commit is contained in:
parent
0e7949b1a0
commit
fca6cf9433
2 changed files with 9 additions and 0 deletions
|
@ -15,6 +15,7 @@ type UserInfo interface {
|
|||
UserInfoPhone
|
||||
GetAddress() UserInfoAddress
|
||||
GetClaim(key string) interface{}
|
||||
GetClaims() map[string]interface{}
|
||||
}
|
||||
|
||||
type UserInfoProfile interface {
|
||||
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue