Skip to content

Commit

Permalink
For x509 authentication, print only username
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierlemasle authored and rajatjindal committed Nov 21, 2021
1 parent 5703e02 commit f546471
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/cmd/whoami.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ func (o *WhoAmIOptions) Run() error {
if err != nil {
return err
}
fmt.Println(cert.Subject)
username := cert.Subject.CommonName
fmt.Println(username)
return nil
}

Expand Down

0 comments on commit f546471

Please sign in to comment.