A list of the interceptors for the registry server. Args: auth_type: The type of authorization manager, from the feature store configuration. Returns: list[grpc.ServerInterceptor]: Optional list of interceptors. If the authorization type is set to `NONE`, it returns `N
(
auth_type: AuthManagerType,
)
| 1403 | |
| 1404 | |
| 1405 | def _grpc_interceptors( |
| 1406 | auth_type: AuthManagerType, |
| 1407 | ) -> Optional[list[grpc.ServerInterceptor]]: |
| 1408 | """ |
| 1409 | A list of the interceptors for the registry server. |
| 1410 | |
| 1411 | Args: |
| 1412 | auth_type: The type of authorization manager, from the feature store configuration. |
| 1413 | |
| 1414 | Returns: |
| 1415 | list[grpc.ServerInterceptor]: Optional list of interceptors. If the authorization type is set to `NONE`, it returns `None`. |
| 1416 | """ |
| 1417 | if auth_type == AuthManagerType.NONE: |
| 1418 | return [ErrorInterceptor()] |
| 1419 | |
| 1420 | return [AuthInterceptor(), ErrorInterceptor()] |
no test coverage detected