mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-04 20:03:18 +02:00
authorize: use impersonate email/groups in JWT (#1364)
This commit is contained in:
parent
4fb90fabe8
commit
0a2638e5dc
2 changed files with 24 additions and 0 deletions
|
@ -247,6 +247,22 @@ func TestEvaluator_JWTPayload(t *testing.T) {
|
|||
"groups": []string{"group1", "group2", "admin", "test"},
|
||||
},
|
||||
},
|
||||
{
|
||||
"with impersonate",
|
||||
&Request{
|
||||
HTTP: RequestHTTP{URL: "https://example.com"},
|
||||
Session: RequestSession{
|
||||
ImpersonateEmail: "user@example.com",
|
||||
ImpersonateGroups: []string{"admin", "test"},
|
||||
},
|
||||
},
|
||||
map[string]interface{}{
|
||||
"iss": "authn.example.com",
|
||||
"aud": "example.com",
|
||||
"email": "user@example.com",
|
||||
"groups": []string{"admin", "test"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue