(ctx context.Context)
| 325 | } |
| 326 | |
| 327 | func GetJwtToken(ctx context.Context) string { |
| 328 | md, ok := metadata.FromIncomingContext(ctx) |
| 329 | if !ok { |
| 330 | return "" |
| 331 | } |
| 332 | jwtToken := md.Get(string(AuthJwtCtxKey)) |
| 333 | if len(jwtToken) != 1 { |
| 334 | return "" |
| 335 | } |
| 336 | return jwtToken[0] |
| 337 | } |
| 338 | |
| 339 | // validateThroughJWKUrl validates the JWT token against the given list of JWKUrls. |
| 340 | // It returns an error only if the token is not validated against even one of the |
no test coverage detected