(self)
| 384 | } |
| 385 | |
| 386 | async fn get_meta(self) -> Result<GetMetaResponse> { |
| 387 | let bootstrap_info = fs::read_to_string(self.state.config.bootstrap_info()) |
| 388 | .ok() |
| 389 | .and_then(|s| serde_json::from_str(&s).ok()); |
| 390 | let info = self.state.config.auth_api.get_info().await?; |
| 391 | Ok(GetMetaResponse { |
| 392 | ca_cert: self.state.inner.root_ca.pem_cert.clone(), |
| 393 | allow_any_upgrade: self.state.inner.config.auth_api.is_dev(), |
| 394 | k256_pubkey: self |
| 395 | .state |
| 396 | .inner |
| 397 | .k256_key |
| 398 | .verifying_key() |
| 399 | .to_sec1_bytes() |
| 400 | .to_vec(), |
| 401 | bootstrap_info, |
| 402 | is_dev: self.state.config.auth_api.is_dev(), |
| 403 | kms_contract_address: info.kms_contract_address, |
| 404 | chain_id: info.chain_id, |
| 405 | gateway_app_id: info.gateway_app_id, |
| 406 | app_auth_implementation: info.app_implementation, |
| 407 | }) |
| 408 | } |
| 409 | |
| 410 | async fn get_kms_key(self, request: GetKmsKeyRequest) -> Result<KmsKeyResponse> { |
| 411 | self.ensure_self_allowed() |
no test coverage detected