MCPcopy Create free account
hub / github.com/aws/aws-lambda-rust-runtime / authorizer

Method authorizer

lambda-http/src/request.rs:475–486  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

473 /// Returns the Api Gateway Authorizer information for a request.
474 #[cfg(any(feature = "apigw_rest", feature = "apigw_http", feature = "apigw_websockets"))]
475 pub fn authorizer(&self) -> Option<&ApiGatewayRequestAuthorizer> {
476 match self {
477 #[cfg(feature = "apigw_rest")]
478 Self::ApiGatewayV1(ag) => Some(&ag.authorizer),
479 #[cfg(feature = "apigw_http")]
480 Self::ApiGatewayV2(ag) => ag.authorizer.as_ref(),
481 #[cfg(feature = "apigw_websockets")]
482 Self::WebSocket(ag) => Some(&ag.authorizer),
483 #[cfg(any(feature = "alb", feature = "pass_through", feature = "vpc_lattice"))]
484 _ => None,
485 }
486 }
487}
488
489/// Deserializes a `Request` from a `Read` impl providing JSON events.

Callers 3

from_requestMethod · 0.80

Calls 1

as_refMethod · 0.80

Tested by

no test coverage detected