Search in sources :

Example 1 with NoOpSigner

use of software.amazon.awssdk.core.signer.NoOpSigner in project aws-sdk-java-v2 by aws.

the class AsyncHttpClientApiCallTimeoutTests method withInterceptors.

private ExecutionContext withInterceptors(ExecutionInterceptor... requestHandlers) {
    ExecutionInterceptorChain interceptors = new ExecutionInterceptorChain(Arrays.asList(requestHandlers));
    InterceptorContext incerceptorContext = InterceptorContext.builder().request(NoopTestRequest.builder().build()).httpRequest(generateRequest()).build();
    return ExecutionContext.builder().signer(new NoOpSigner()).interceptorChain(interceptors).executionAttributes(new ExecutionAttributes()).interceptorContext(incerceptorContext).metricCollector(MetricCollector.create("ApiCall")).build();
}
Also used : NoOpSigner(software.amazon.awssdk.core.signer.NoOpSigner) ExecutionAttributes(software.amazon.awssdk.core.interceptor.ExecutionAttributes) ExecutionInterceptorChain(software.amazon.awssdk.core.interceptor.ExecutionInterceptorChain) InterceptorContext(software.amazon.awssdk.core.interceptor.InterceptorContext)

Example 2 with NoOpSigner

use of software.amazon.awssdk.core.signer.NoOpSigner in project aws-sdk-java-v2 by aws.

the class HttpClientApiCallAttemptTimeoutTest method withInterceptors.

private ExecutionContext withInterceptors(ExecutionInterceptor... requestHandlers) {
    ExecutionInterceptorChain interceptors = new ExecutionInterceptorChain(Arrays.asList(requestHandlers));
    InterceptorContext incerceptorContext = InterceptorContext.builder().request(NoopTestRequest.builder().build()).httpRequest(generateRequest()).build();
    return ExecutionContext.builder().signer(new NoOpSigner()).interceptorChain(interceptors).executionAttributes(new ExecutionAttributes()).interceptorContext(incerceptorContext).metricCollector(MetricCollector.create("ApiCall")).build();
}
Also used : NoOpSigner(software.amazon.awssdk.core.signer.NoOpSigner) ExecutionAttributes(software.amazon.awssdk.core.interceptor.ExecutionAttributes) ExecutionInterceptorChain(software.amazon.awssdk.core.interceptor.ExecutionInterceptorChain) InterceptorContext(software.amazon.awssdk.core.interceptor.InterceptorContext)

Example 3 with NoOpSigner

use of software.amazon.awssdk.core.signer.NoOpSigner in project aws-sdk-java-v2 by aws.

the class ExceptionReportingUtilsTest method context.

public RequestExecutionContext context(ExecutionInterceptor... executionInterceptors) {
    List<ExecutionInterceptor> interceptors = Arrays.asList(executionInterceptors);
    ExecutionInterceptorChain executionInterceptorChain = new ExecutionInterceptorChain(interceptors);
    return RequestExecutionContext.builder().executionContext(ExecutionContext.builder().signer(new NoOpSigner()).executionAttributes(new ExecutionAttributes()).interceptorContext(InterceptorContext.builder().request(ValidSdkObjects.sdkRequest()).build()).interceptorChain(executionInterceptorChain).build()).originalRequest(ValidSdkObjects.sdkRequest()).build();
}
Also used : NoOpSigner(software.amazon.awssdk.core.signer.NoOpSigner) ExecutionAttributes(software.amazon.awssdk.core.interceptor.ExecutionAttributes) ExecutionInterceptorChain(software.amazon.awssdk.core.interceptor.ExecutionInterceptorChain) ExecutionInterceptor(software.amazon.awssdk.core.interceptor.ExecutionInterceptor)

Example 4 with NoOpSigner

use of software.amazon.awssdk.core.signer.NoOpSigner in project edison-microservice by otto-de.

the class S3TestHelper method createS3Client.

public static S3Client createS3Client(final Integer mappedPort) {
    final AwsBasicCredentials credentials = AwsBasicCredentials.create("test", "test");
    final StaticCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(credentials);
    return S3Client.builder().credentialsProvider(credentialsProvider).endpointOverride(URI.create(String.format("http://localhost:%d", mappedPort))).region(Region.EU_CENTRAL_1).serviceConfiguration(S3Configuration.builder().pathStyleAccessEnabled(true).build()).overrideConfiguration(ClientOverrideConfiguration.builder().putAdvancedOption(SdkAdvancedClientOption.SIGNER, new NoOpSigner()).build()).build();
}
Also used : NoOpSigner(software.amazon.awssdk.core.signer.NoOpSigner) StaticCredentialsProvider(software.amazon.awssdk.auth.credentials.StaticCredentialsProvider) AwsBasicCredentials(software.amazon.awssdk.auth.credentials.AwsBasicCredentials)

Example 5 with NoOpSigner

use of software.amazon.awssdk.core.signer.NoOpSigner in project aws-sdk-java-v2 by aws.

the class HttpClientApiCallTimeoutTest method withInterceptors.

private ExecutionContext withInterceptors(ExecutionInterceptor... requestHandlers) {
    ExecutionInterceptorChain interceptors = new ExecutionInterceptorChain(Arrays.asList(requestHandlers));
    InterceptorContext incerceptorContext = InterceptorContext.builder().request(NoopTestRequest.builder().build()).httpRequest(generateRequest()).build();
    return ExecutionContext.builder().signer(new NoOpSigner()).interceptorChain(interceptors).executionAttributes(new ExecutionAttributes()).interceptorContext(incerceptorContext).metricCollector(MetricCollector.create("ApiCall")).build();
}
Also used : NoOpSigner(software.amazon.awssdk.core.signer.NoOpSigner) ExecutionAttributes(software.amazon.awssdk.core.interceptor.ExecutionAttributes) ExecutionInterceptorChain(software.amazon.awssdk.core.interceptor.ExecutionInterceptorChain) InterceptorContext(software.amazon.awssdk.core.interceptor.InterceptorContext)

Aggregations

NoOpSigner (software.amazon.awssdk.core.signer.NoOpSigner)8 ExecutionAttributes (software.amazon.awssdk.core.interceptor.ExecutionAttributes)7 ExecutionInterceptorChain (software.amazon.awssdk.core.interceptor.ExecutionInterceptorChain)5 InterceptorContext (software.amazon.awssdk.core.interceptor.InterceptorContext)4 Test (org.junit.Test)3 AwsBasicCredentials (software.amazon.awssdk.auth.credentials.AwsBasicCredentials)3 StaticCredentialsProvider (software.amazon.awssdk.auth.credentials.StaticCredentialsProvider)3 SdkHttpFullRequest (software.amazon.awssdk.http.SdkHttpFullRequest)3 URI (java.net.URI)2 Clock (java.time.Clock)2 Duration (java.time.Duration)2 Instant (java.time.Instant)2 LocalDate (java.time.LocalDate)2 LocalDateTime (java.time.LocalDateTime)2 ZoneId (java.time.ZoneId)2 ZonedDateTime (java.time.ZonedDateTime)2 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)2 Assertions.assertThatThrownBy (org.assertj.core.api.Assertions.assertThatThrownBy)2 Offset (org.assertj.core.data.Offset)2 After (org.junit.After)2