MCPcopy
hub / github.com/grpc/grpc-go / removeServiceNameFromJWTURI

Function removeServiceNameFromJWTURI

credentials/oauth/oauth.go:61–68  ·  view source on GitHub ↗

removeServiceNameFromJWTURI removes RPC service name from URI.

(uri string)

Source from the content-addressed store, hash-verified

59
60// removeServiceNameFromJWTURI removes RPC service name from URI.
61func removeServiceNameFromJWTURI(uri string) (string, error) {
62 parsed, err := url.Parse(uri)
63 if err != nil {
64 return "", err
65 }
66 parsed.Path = "/"
67 return parsed.String(), nil
68}
69
70type jwtAccess struct {
71 jsonKey []byte

Callers 2

GetRequestMetadataMethod · 0.85

Calls 2

ParseMethod · 0.65
StringMethod · 0.65

Tested by 1