MCPcopy Create free account
hub / github.com/wavetermdev/waveterm / ValidateAndExtractRpcContextFromToken

Function ValidateAndExtractRpcContextFromToken

pkg/wshutil/wshutil.go:250–256  ·  view source on GitHub ↗
(tokenStr string)

Source from the content-addressed store, hash-verified

248}
249
250func ValidateAndExtractRpcContextFromToken(tokenStr string) (*wshrpc.RpcContext, error) {
251 claims, err := wavejwt.ValidateAndExtract(tokenStr)
252 if err != nil {
253 return nil, err
254 }
255 return claimsToRpcCtx(claims), nil
256}
257
258func RunWshRpcOverListener(listener net.Listener, readCallback func()) {
259 defer log.Printf("domain socket listener shutting down\n")

Callers 1

AuthenticateCommandMethod · 0.85

Calls 2

ValidateAndExtractFunction · 0.92
claimsToRpcCtxFunction · 0.85

Tested by

no test coverage detected