mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:37:32 +00:00
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:
@@ -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
|
||||
}
|
||||
|
@@ -48,6 +48,7 @@ type UserSelection struct {
|
||||
UserSessionState UserSessionState
|
||||
SelectionPossible bool
|
||||
AvatarKey string
|
||||
ResourceOwner string
|
||||
}
|
||||
|
||||
type UserSessionState int32
|
||||
|
Reference in New Issue
Block a user