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

Function tokenEmail

command/ssh/ssh.go:256–262  ·  view source on GitHub ↗

tokenEmail returns if the token payload has an email address. This is mainly used on OIDC token.

(s string)

Source from the content-addressed store, hash-verified

254// tokenEmail returns if the token payload has an email address. This is
255// mainly used on OIDC token.
256func tokenEmail(s string) (string, bool) {
257 jwt, err := token.ParseInsecure(s)
258 if err != nil {
259 return "", false
260 }
261 return jwt.Payload.Email, jwt.Payload.Email != ""
262}
263
264// tokenSubject extracts the token subject.
265func tokenSubject(s string) (string, bool) {

Callers 2

doLoginIfNeededFunction · 0.85
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…