(ttl: Duration)
| 261 | } |
| 262 | |
| 263 | fn pair_with_ttl(ttl: Duration) -> (SandboxJwtIssuer, SandboxJwtAuthenticator) { |
| 264 | let mat = generate_jwt_key().expect("jwt key"); |
| 265 | let issuer = SandboxJwtIssuer::from_pem( |
| 266 | mat.signing_key_pem.as_bytes(), |
| 267 | mat.kid.clone(), |
| 268 | "test-gateway", |
| 269 | ttl, |
| 270 | ) |
| 271 | .unwrap(); |
| 272 | let auth = SandboxJwtAuthenticator::from_pem( |
| 273 | mat.public_key_pem.as_bytes(), |
| 274 | mat.kid, |
| 275 | "test-gateway", |
| 276 | ) |
| 277 | .unwrap(); |
| 278 | (issuer, auth) |
| 279 | } |
| 280 | |
| 281 | #[tokio::test] |
| 282 | async fn mint_and_validate_round_trip() { |
no test coverage detected