fix: add avatar url in members, user grants, session and oidc responses (#1852)

* fix: add avatar url in members, user grants, session and oidc responses

* fix auth request tests
This commit is contained in:
Livio Amstutz
2021-06-11 13:20:39 +02:00
committed by GitHub
parent 1e77b8aeae
commit 770994e143
55 changed files with 368 additions and 207 deletions

View File

@@ -17,7 +17,7 @@ type Profile struct {
Gender Gender
PreferredLoginName string
LoginNames []string
Avatar string
AvatarURL string
}
func (p *Profile) IsValid() bool {

View File

@@ -20,6 +20,7 @@ type UserSessionView struct {
LoginName string
DisplayName string
AvatarKey string
AvatarURL string
SelectedIDPConfigID string
PasswordVerification time.Time
PasswordlessVerification time.Time

View File

@@ -41,6 +41,7 @@ type HumanView struct {
NickName string
DisplayName string
AvatarKey string
AvatarURL string
PreSignedAvatar *url.URL
PreferredLanguage string
Gender Gender
@@ -251,6 +252,7 @@ func (u *UserView) GetProfile() (*Profile, error) {
Gender: u.Gender,
PreferredLoginName: u.PreferredLoginName,
LoginNames: u.LoginNames,
AvatarURL: u.AvatarURL,
}, nil
}