MCPcopy
hub / github.com/smallstep/cli / tokenSubject

Function tokenSubject

command/ssh/ssh.go:265–271  ·  view source on GitHub ↗

tokenSubject extracts the token subject.

(s string)

Source from the content-addressed store, hash-verified

263
264// tokenSubject extracts the token subject.
265func 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
273func sshConfigErr(err error) error {
274 return &errs.Error{

Callers 1

loginActionFunction · 0.85

Calls 1

ParseInsecureFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…