| 668 | /// Return the effective gRPC rate limit, if fully configured and enabled. |
| 669 | #[must_use] |
| 670 | pub fn grpc_rate_limit(&self) -> Option<(u64, Duration)> { |
| 671 | let requests = self.grpc_rate_limit_requests?; |
| 672 | let window_secs = self.grpc_rate_limit_window_secs?; |
| 673 | if requests == 0 || window_secs == 0 { |
| 674 | None |
| 675 | } else { |
| 676 | Some((requests, Duration::from_secs(window_secs))) |
| 677 | } |
| 678 | } |
| 679 | /// Set the OIDC configuration for JWT-based authentication. |
| 680 | #[must_use] |
| 681 | pub fn with_oidc(mut self, oidc: OidcConfig) -> Self { |