@Test public void usesDefaultSignerWhenNoRequest() { SignerProviderContext ctx = SignerProviderContext.builder().build(); assertThat(defaultSignerProvider.getSigner(ctx) == DEFAULT_SIGNER, is(true)); }
@Override public Signer getSigner(SignerProviderContext context) { Request<?> request = context.getRequest(); if (request == null || shouldUseDefaultSigner(request.getOriginalRequest())) { if (context.isRedirect()) { return awsClient.getSignerByURI(context.getUri()); } return defaultSigner; } SignerTypeAware signerTypeAware = (SignerTypeAware) request.getOriginalRequest(); SignerParams params = new SignerParams(awsClient.getServiceName(), getSigningRegionForRequestURI(request.getEndpoint())); return SignerFactory.createSigner(signerTypeAware.getSignerType(), params); }
DefaultSignerProvider extends SignerProvider { @Override public Signer getSigner(SignerProviderContext context) { Request<?> request = context.getRequest(); if (request == null || shouldUseDefaultSigner(request.getOriginalRequest())) { if (context.isRedirect()) { return awsClient.getSignerByURI(context.getUri()); } return defaultSigner; } SignerTypeAware signerTypeAware = (SignerTypeAware) request.getOriginalRequest(); SignerParams params = new SignerParams(awsClient.getServiceName(), getSigningRegionForRequestURI(request.getEndpoint())); return SignerFactory.createSigner(signerTypeAware.getSignerType(), params); } }
DefaultSignerProvider extends SignerProvider { @Override public Signer getSigner(SignerProviderContext context) { Request<?> request = context.getRequest(); if (request == null || shouldUseDefaultSigner(request.getOriginalRequest())) { if (context.isRedirect()) { return awsClient.getSignerByURI(context.getUri()); } return defaultSigner; } SignerTypeAware signerTypeAware = (SignerTypeAware) request.getOriginalRequest(); SignerParams params = new SignerParams(awsClient.getServiceName(), getSigningRegionForRequestURI(request.getEndpoint())); return SignerFactory.createSigner(signerTypeAware.getSignerType(), params); } DefaultSignerProvider(final AmazonWebServiceClient awsClient,
                                 final Signer defaultSigner); }
DefaultSignerProvider extends SignerProvider { @Override public Signer getSigner(SignerProviderContext context) { Request<?> request = context.getRequest(); if (request == null || shouldUseDefaultSigner(request.getOriginalRequest())) { if (context.isRedirect()) { return awsClient.getSignerByURI(context.getUri()); } return defaultSigner; } SignerTypeAware signerTypeAware = (SignerTypeAware) request.getOriginalRequest(); SignerParams params = new SignerParams(awsClient.getServiceName(), getSigningRegionForRequestURI(request.getEndpoint())); return SignerFactory.createSigner(signerTypeAware.getSignerType(), params); } DefaultSignerProvider(final AmazonWebServiceClient awsClient,
                                 final Signer defaultSigner); @Override Signer getSigner(SignerProviderContext context); }
DefaultSignerProvider extends SignerProvider { @Override public Signer getSigner(SignerProviderContext context) { Request<?> request = context.getRequest(); if (request == null || shouldUseDefaultSigner(request.getOriginalRequest())) { if (context.isRedirect()) { return awsClient.getSignerByURI(context.getUri()); } return defaultSigner; } SignerTypeAware signerTypeAware = (SignerTypeAware) request.getOriginalRequest(); SignerParams params = new SignerParams(awsClient.getServiceName(), getSigningRegionForRequestURI(request.getEndpoint())); return SignerFactory.createSigner(signerTypeAware.getSignerType(), params); } DefaultSignerProvider(final AmazonWebServiceClient awsClient,
                                 final Signer defaultSigner); @Override Signer getSigner(SignerProviderContext context);  }