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

Function ParseInsecure

token/parse.go:154–166  ·  view source on GitHub ↗

ParseInsecure parses the given token.

(token string)

Source from the content-addressed store, hash-verified

152
153// ParseInsecure parses the given token.
154func ParseInsecure(token string) (*JSONWebToken, error) {
155 jwt, err := jose.ParseSigned(token)
156 if err != nil {
157 return nil, errors.Wrap(err, "error parsing token")
158 }
159
160 var p Payload
161 if err := jwt.UnsafeClaimsWithoutVerification(&p); err != nil {
162 return nil, errors.Wrap(err, "error parsing token claims")
163 }
164
165 return parseResponse(jwt, p)
166}
167
168func parseResponse(jwt *jose.JSONWebToken, p Payload) (*JSONWebToken, error) {
169 switch {

Callers 8

GetClientMethod · 0.92
CreateSignRequestMethod · 0.92
loginOnUnauthorizedFunction · 0.92
tokenEmailFunction · 0.92
tokenSubjectFunction · 0.92
signCertificateActionFunction · 0.92
certificateActionFunction · 0.92
TestParseInsecureFunction · 0.85

Calls 1

parseResponseFunction · 0.85

Tested by 1

TestParseInsecureFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…