Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Api gateway: Make client_cert optional #82

Merged
merged 2 commits into from
Apr 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions aws_lambda_events/src/apigw/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,8 @@ pub struct ApiGatewayCustomAuthorizerRequestTypeRequestIdentity {
#[serde(deserialize_with = "deserialize_lambda_string")]
#[serde(default)]
pub source_ip: Option<String>,
pub client_cert: ApiGatewayCustomAuthorizerRequestTypeRequestIdentityClientCert,
#[serde(default)]
pub client_cert: Option<ApiGatewayCustomAuthorizerRequestTypeRequestIdentityClientCert>,
}

/// `ApiGatewayCustomAuthorizerRequestTypeRequestIdentityClientCert` contains certificate information for the request caller if using mTLS.
Expand Down Expand Up @@ -518,7 +519,8 @@ pub struct ApiGatewayCustomAuthorizerRequestTypeRequestIdentityClientCertValidit
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ApiGatewayV2httpRequestContextAuthentication {
pub client_cert: ApiGatewayV2httpRequestContextAuthenticationClientCert,
#[serde(default)]
pub client_cert: Option<ApiGatewayV2httpRequestContextAuthenticationClientCert>,
}

/// `ApiGatewayV2httpRequestContextAuthenticationClientCert` contains client certificate information for the request caller if using mTLS.
Expand Down