feat: get all claims (#209)

This commit is contained in:
Igor Morozov 2022-08-30 17:09:56 +03:00 committed by GitHub
parent 0e7949b1a0
commit fca6cf9433
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -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
}