mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-04 01:09:36 +02:00
ssh: improve 'whoami' format (#5714)
Old: ``` User ID: xxx Session ID: xxx Expires at: 2025-07-10 08:39:40.64992461 +0000 UTC Claims: aud: [xxx] email: [foo@bar.com] email_verified: [true] exp: [1.75212238e+09] family_name: [bar] given_name: [foo] iat: [1.75208638e+09] iss: [https://example.com] name: [Foo Bar] nickname: [foobar] picture: [https://example.com] sub: [xxx] updated_at: [2025-07-09T18:12:15.226Z] ``` New: ``` User ID: xxx Session ID: xxx Expires at: 2025-07-10 11:23:27.641004885 +0000 UTC (in 13h59m57s) Claims: aud: "xxx" email: "foo@bar.com" email_verified: true exp: 2025-07-10 07:23:27 +0000 UTC (in 9h59m56s) family_name: "bar" given_name: "foo" iat: 2025-07-09 21:23:27 +0000 UTC (4s ago) iss: "https://example.com" name: "Foo Bar" nickname: "foobar" picture: "https://example.com" sub: "xxx" updated_at: "2025-07-09T18:12:15.226Z" ```
This commit is contained in:
parent
88c7a6537a
commit
33abea3ea6
4 changed files with 64 additions and 32 deletions
|
@ -337,7 +337,7 @@ func (state state) GetUserInfo(users map[string]*User) *userInfo {
|
|||
for _, u := range users {
|
||||
if u.Email == state.Email {
|
||||
userInfo.Subject = u.ID
|
||||
userInfo.Name = u.FirstName + " " + u.LastName
|
||||
userInfo.Name = strings.TrimSpace(u.FirstName + " " + u.LastName)
|
||||
userInfo.FamilyName = u.LastName
|
||||
userInfo.GivenName = u.FirstName
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue