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

Function claimsToRpcCtx

pkg/wshutil/wshutil.go:239–248  ·  view source on GitHub ↗
(claims *wavejwt.WaveJwtClaims)

Source from the content-addressed store, hash-verified

237}
238
239func claimsToRpcCtx(claims *wavejwt.WaveJwtClaims) *wshrpc.RpcContext {
240 return &wshrpc.RpcContext{
241 SockName: claims.Sock,
242 RouteId: claims.RouteId,
243 ProcRoute: claims.ProcRoute,
244 BlockId: claims.BlockId,
245 Conn: claims.Conn,
246 IsRouter: claims.Router,
247 }
248}
249
250func ValidateAndExtractRpcContextFromToken(tokenStr string) (*wshrpc.RpcContext, error) {
251 claims, err := wavejwt.ValidateAndExtract(tokenStr)

Calls

no outgoing calls

Tested by

no test coverage detected