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

@@ -1,8 +1,9 @@
package domain
import (
es_models "github.com/caos/zitadel/internal/eventstore/v1/models"
"golang.org/x/text/language"
es_models "github.com/caos/zitadel/internal/eventstore/v1/models"
)
type Profile struct {
@@ -21,3 +22,10 @@ type Profile struct {
func (p *Profile) IsValid() bool {
return p.FirstName != "" && p.LastName != ""
}
func AvatarURL(prefix, resourceOwner, key string) string {
if prefix == "" || resourceOwner == "" || key == "" {
return ""
}
return prefix + resourceOwner + "/" + key
}

View File

@@ -48,6 +48,7 @@ type UserSelection struct {
UserSessionState UserSessionState
SelectionPossible bool
AvatarKey string
ResourceOwner string
}
type UserSessionState int32