class Aws::S3::Plugins::ExpressSessionAuth::Handler
@api private
def call(context)
def call(context) context[:s3_express_endpoint] = true if s3_express_endpoint?(context) # if s3 express auth, use new credentials and sign additional header if context[:auth_scheme]['name'] == 'sigv4-s3express' && !context.config.disable_s3_express_session_auth bucket = context.params[:bucket] credentials_provider = context.config.express_credentials_provider credentials = credentials_provider.express_credentials_for(bucket) context[:sigv4_credentials] = credentials # Sign will use this end with_metric(credentials) { @handler.call(context) } end
def s3_express_endpoint?(context)
def s3_express_endpoint?(context) context[:endpoint_properties]['backend'] == 'S3Express' end
def with_metric(credentials, &block)
def with_metric(credentials, &block) return block.call unless credentials Aws::Plugins::UserAgent.metric('S3_EXPRESS_BUCKET', &block) end