mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
use the directory email when provided for the jwt (#1647)
This commit is contained in:
parent
7e86ed3c60
commit
744d4453d5
1 changed files with 3 additions and 0 deletions
|
@ -197,6 +197,9 @@ func (e *Evaluator) JWTPayload(req *Request) map[string]interface{} {
|
|||
payload["email"] = u.GetEmail()
|
||||
}
|
||||
if du, ok := req.DataBrokerData.Get("type.googleapis.com/directory.User", s.GetUserId()).(*directory.User); ok {
|
||||
if du.GetEmail() != "" {
|
||||
payload["email"] = du.GetEmail()
|
||||
}
|
||||
var groupNames []string
|
||||
for _, groupID := range du.GetGroupIds() {
|
||||
if dg, ok := req.DataBrokerData.Get("type.googleapis.com/directory.Group", groupID).(*directory.Group); ok {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue