MCPcopy Create free account
hub / github.com/koding/kite / ExtractKiteID

Function ExtractKiteID

kitetest/kitetest.go:168–178  ·  view source on GitHub ↗

ExtractKiteID extracts kite ID from the raw JWT token.

(token string)

Source from the content-addressed store, hash-verified

166
167// ExtractKiteID extracts kite ID from the raw JWT token.
168func ExtractKiteID(token string) (string, error) {
169 te := &TokenExtractor{}
170
171 _, err := jwt.Parse(token, te.Extract)
172
173 if e, ok := err.(*jwt.ValidationError); ok && e.Error() == errTokenExtractor.Error() {
174 return te.KiteID, nil
175 }
176
177 return "", err
178}

Callers

nothing calls this directly

Calls 1

ErrorMethod · 0.65

Tested by

no test coverage detected