Skip to content

Commit 5a9bd22

Browse files
authored
Improve SRA signer user experience, with documentation and helper methods. (#5270)
1. Deprecate old signer interfaces, directing to new interfaces. 2. Add Javadoc for new v4 and v4a signers. 3. Add utility methods for creating ContentStreamProviders.
1 parent 44a3e01 commit 5a9bd22

File tree

24 files changed

+531
-11
lines changed

24 files changed

+531
-11
lines changed

core/auth-crt/src/main/java/software/amazon/awssdk/authcrt/signer/AwsCrtS3V4aSigner.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@
3838
* <p/>
3939
* See <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">
4040
* Amazon S3 Sigv4 documentation</a> for more detailed information.
41+
*
42+
* @deprecated Use {@code software.amazon.awssdk.http.auth.aws.signer.AwsV4aHttpSigner} from the 'http-auth-aws' module.
4143
*/
4244
@SdkPublicApi
4345
@Immutable
4446
@ThreadSafe
47+
@Deprecated
4548
public interface AwsCrtS3V4aSigner extends Signer, Presigner {
4649

4750
/**

core/auth-crt/src/main/java/software/amazon/awssdk/authcrt/signer/AwsCrtV4aSigner.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@
2828
* (Common RunTime) library.
2929
* <p/>
3030
* In CRT signing, payload signing is the default unless an override value is specified.
31+
*
32+
* @deprecated Use {@code software.amazon.awssdk.http.auth.aws.signer.AwsV4aHttpSigner} from the 'http-auth-aws' module.
3133
*/
3234
@SdkPublicApi
3335
@Immutable
3436
@ThreadSafe
37+
@Deprecated
3538
public interface AwsCrtV4aSigner extends Signer, Presigner {
3639

3740
/**

core/auth/src/main/java/software/amazon/awssdk/auth/signer/AsyncAws4Signer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@
3434
/**
3535
* AWS Signature Version 4 signer that can include contents of an asynchronous request body into the signature
3636
* calculation.
37+
*
38+
* @deprecated Use {@code software.amazon.awssdk.http.auth.aws.signer.AwsV4HttpSigner} from the 'http-auth-aws' module.
3739
*/
40+
@Deprecated
3841
@SdkPublicApi
3942
public final class AsyncAws4Signer extends BaseAws4Signer implements AsyncSigner {
4043

core/auth/src/main/java/software/amazon/awssdk/auth/signer/Aws4Signer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020

2121
/**
2222
* Signer implementation that signs requests with the AWS4 signing protocol.
23+
*
24+
* @deprecated Use {@code software.amazon.awssdk.http.auth.aws.signer.AwsV4HttpSigner} from the 'http-auth-aws' module.
2325
*/
26+
@Deprecated
2427
@SdkPublicApi
2528
public final class Aws4Signer extends BaseAws4Signer {
2629

core/auth/src/main/java/software/amazon/awssdk/auth/signer/Aws4UnsignedPayloadSigner.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@
3232
* <p>
3333
* Payloads are still signed for requests over HTTP to preserve the request
3434
* integrity over a non-secure transport.
35+
*
36+
* @deprecated Use {@code software.amazon.awssdk.http.auth.aws.signer.AwsV4HttpSigner} from the 'http-auth-aws' module.
3537
*/
3638
@SdkPublicApi
39+
@Deprecated
3740
public final class Aws4UnsignedPayloadSigner extends BaseAws4Signer {
3841

3942
public static final String UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD";

core/auth/src/main/java/software/amazon/awssdk/auth/signer/AwsS3V4Signer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020

2121
/**
2222
* AWS4 signer implementation for AWS S3
23+
*
24+
* @deprecated Use {@code software.amazon.awssdk.http.auth.aws.signer.AwsV4HttpSigner} from the 'http-auth-aws' module.
2325
*/
26+
@Deprecated
2427
@SdkPublicApi
2528
public final class AwsS3V4Signer extends AbstractAwsS3V4Signer {
2629
private AwsS3V4Signer() {

core/auth/src/main/java/software/amazon/awssdk/auth/signer/EventStreamAws4Signer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import software.amazon.awssdk.annotations.SdkProtectedApi;
1919
import software.amazon.awssdk.auth.signer.internal.BaseEventStreamAsyncAws4Signer;
2020

21+
@Deprecated
2122
@SdkProtectedApi
2223
public final class EventStreamAws4Signer extends BaseEventStreamAsyncAws4Signer {
2324
private EventStreamAws4Signer() {

core/auth/src/main/java/software/amazon/awssdk/auth/signer/SignerLoader.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
/**
2727
* Utility class for instantiating signers only if they're available on the class path.
2828
*/
29+
@Deprecated
2930
@SdkProtectedApi
3031
public final class SignerLoader {
3132

core/auth/src/main/java/software/amazon/awssdk/auth/signer/internal/BaseAws4Signer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
* Abstract base class for concrete implementations of Aws4 signers.
2828
*/
2929
@SdkInternalApi
30+
@Deprecated
3031
public abstract class BaseAws4Signer extends AbstractAws4Signer<Aws4SignerParams, Aws4PresignerParams> {
3132

3233
@Override

core/auth/src/main/java/software/amazon/awssdk/auth/token/signer/aws/BearerTokenSigner.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@
2727

2828
/**
2929
* A {@link Signer} that will sign a request with Bearer token authorization.
30+
*
31+
* @deprecated Use {@code software.amazon.awssdk.http.auth.signer.BearerHttpSigner} from the 'http-auth' module.
3032
*/
3133
@SdkPublicApi
34+
@Deprecated
3235
public final class BearerTokenSigner implements Signer {
3336

3437
private static final String BEARER_LABEL = "Bearer";

0 commit comments

Comments
 (0)