cacheable determines whether the provider discovery response can be cached. Returns the invalidate interval with a value true when the response is cacheable and zero interval with a value false otherwise.
(header http.Header)
| 782 | // Returns the invalidate interval with a value true when the response is cacheable |
| 783 | // and zero interval with a value false otherwise. |
| 784 | func cacheable(header http.Header) (ttl time.Duration, ok bool, err error) { |
| 785 | ttl, ok, err = cacheControlMaxAge(header) |
| 786 | if err != nil || ok { |
| 787 | return ttl, ok, err |
| 788 | } |
| 789 | return getExpiration(header) |
| 790 | } |
| 791 | |
| 792 | // GetOIDCClientContext returns a new Context that carries the provided HTTP client |
| 793 | // with TLS certificate verification disabled when insecureSkipVerify is true and |