(ctx context.Context)
| 285 | } |
| 286 | |
| 287 | func GetForceNamespace(ctx context.Context) string { |
| 288 | md, ok := metadata.FromIncomingContext(ctx) |
| 289 | if !ok { |
| 290 | return "" |
| 291 | } |
| 292 | ns := md.Get("force-namespace") |
| 293 | if len(ns) == 0 { |
| 294 | return "" |
| 295 | } |
| 296 | return ns[0] |
| 297 | } |
| 298 | |
| 299 | func ExtractJwt(ctx context.Context) (string, error) { |
| 300 | // extract the jwt and unmarshal the jwt to get the list of groups |
no test coverage detected