(
material: &HashMap<String, String>,
key: &str,
)
| 626 | } |
| 627 | |
| 628 | pub fn parse_material_i64( |
| 629 | material: &HashMap<String, String>, |
| 630 | key: &str, |
| 631 | ) -> Result<Option<i64>, Status> { |
| 632 | let Some(value) = material_value(material, &[key]) else { |
| 633 | return Ok(None); |
| 634 | }; |
| 635 | value |
| 636 | .parse::<i64>() |
| 637 | .map(Some) |
| 638 | .map_err(|_| Status::invalid_argument(format!("{key} material must be a signed integer"))) |
| 639 | } |
| 640 | |
| 641 | fn oauth2_token_url(state: &StoredProviderCredentialRefreshState) -> Result<String, Status> { |
| 642 | if let Some(tenant_id) = material_value(&state.material, &["tenant_id"]) { |
no test coverage detected