tokenSubject extracts the token subject.
(s string)
| 263 | |
| 264 | // tokenSubject extracts the token subject. |
| 265 | func tokenSubject(s string) (string, bool) { |
| 266 | jwt, err := token.ParseInsecure(s) |
| 267 | if err != nil { |
| 268 | return "", false |
| 269 | } |
| 270 | return jwt.Payload.Subject, jwt.Payload.Subject != "" |
| 271 | } |
| 272 | |
| 273 | func sshConfigErr(err error) error { |
| 274 | return &errs.Error{ |
no test coverage detected
searching dependent graphs…