Skip to content

Commit c48dbe5

Browse files
committed
Update signer stubs with latest interface changes
1 parent 4ff4710 commit c48dbe5

File tree

20 files changed

+488
-42
lines changed

20 files changed

+488
-42
lines changed

core/auth/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@
7777
<groupId>software.amazon.eventstream</groupId>
7878
<artifactId>eventstream</artifactId>
7979
</dependency>
80+
<dependency>
81+
<groupId>software.amazon.awssdk</groupId>
82+
<artifactId>http-auth</artifactId>
83+
<version>${awsjavasdk.version}</version>
84+
</dependency>
8085

8186
<dependency>
8287
<groupId>org.junit.jupiter</groupId>

core/http-auth-aws-crt/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
<artifactId>http-auth-aws-crt</artifactId>
2929
<name>AWS Java SDK :: HTTP Auth AWS CRT</name>
3030
<description>
31-
The AWS SDK for Java - HTTP Auth AWS module contains interfaces and implementations for generic HTTP
32-
authentication specific to the AWS CRT.
31+
The AWS SDK for Java - HTTP Auth AWS CRT module holds the AWS Common Runtime based implementations
32+
that are used for authentication with HTTP services.
3333
</description>
3434
<url>https://aws.amazon.com/sdkforjava</url>
3535

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,24 @@
1616
package software.amazon.awssdk.http.auth.aws.crt;
1717

1818
import software.amazon.awssdk.annotations.SdkPublicApi;
19+
import software.amazon.awssdk.http.auth.aws.crt.internal.DefaultAwsCrtS3V4aHttpSigner;
1920
import software.amazon.awssdk.http.auth.spi.HttpSigner;
21+
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
2022

23+
/**
24+
* An {@link HttpSigner} that will sign a request
25+
* using an AWS credentials ({@link AwsCredentialsIdentity}),
26+
* specifically for S3-CRT.
27+
*/
2128
@SdkPublicApi
22-
public interface AwsCrtV4aHttpAuthScheme extends HttpSigner {
29+
public interface AwsCrtS3V4aHttpSigner extends HttpSigner<AwsCredentialsIdentity> {
2330

31+
/**
32+
* Get a default implementation of a {@link AwsCrtS3V4aHttpSigner}
33+
*
34+
* @return AwsCrtS3V4aHttpSigner
35+
*/
36+
static AwsCrtS3V4aHttpSigner create() {
37+
return new DefaultAwsCrtS3V4aHttpSigner();
38+
}
2439
}
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,24 @@
1616
package software.amazon.awssdk.http.auth.aws.crt;
1717

1818
import software.amazon.awssdk.annotations.SdkPublicApi;
19+
import software.amazon.awssdk.http.auth.aws.crt.internal.DefaultAwsCrtV4aHttpSigner;
1920
import software.amazon.awssdk.http.auth.spi.HttpSigner;
21+
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
2022

23+
/**
24+
* An {@link HttpSigner} that will sign a request
25+
* using an AWS credentials ({@link AwsCredentialsIdentity}),
26+
* specifically for CRT.
27+
*/
2128
@SdkPublicApi
22-
public interface AwsCrtS3V4aHttpAuthScheme extends HttpSigner {
29+
public interface AwsCrtV4aHttpSigner extends HttpSigner<AwsCredentialsIdentity> {
2330

31+
/**
32+
* Get a default implementation of a {@link AwsCrtV4aHttpSigner}
33+
*
34+
* @return AwsCrtV4aHttpSigner
35+
*/
36+
static AwsCrtV4aHttpSigner create() {
37+
return new DefaultAwsCrtV4aHttpSigner();
38+
}
2439
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
package software.amazon.awssdk.http.auth.aws.crt.internal;
17+
18+
import software.amazon.awssdk.annotations.SdkInternalApi;
19+
import software.amazon.awssdk.http.auth.aws.crt.AwsCrtS3V4aHttpSigner;
20+
import software.amazon.awssdk.http.auth.spi.AsyncHttpSignRequest;
21+
import software.amazon.awssdk.http.auth.spi.AsyncSignedHttpRequest;
22+
import software.amazon.awssdk.http.auth.spi.SyncHttpSignRequest;
23+
import software.amazon.awssdk.http.auth.spi.SyncSignedHttpRequest;
24+
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
25+
26+
@SdkInternalApi
27+
public class DefaultAwsCrtS3V4aHttpSigner implements AwsCrtS3V4aHttpSigner {
28+
29+
@Override
30+
public SyncSignedHttpRequest sign(SyncHttpSignRequest<? extends AwsCredentialsIdentity> request) {
31+
throw new UnsupportedOperationException();
32+
}
33+
34+
@Override
35+
public AsyncSignedHttpRequest signAsync(AsyncHttpSignRequest<? extends AwsCredentialsIdentity> request) {
36+
throw new UnsupportedOperationException();
37+
}
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
package software.amazon.awssdk.http.auth.aws.crt.internal;
17+
18+
import software.amazon.awssdk.annotations.SdkInternalApi;
19+
import software.amazon.awssdk.http.auth.aws.crt.AwsCrtV4aHttpSigner;
20+
import software.amazon.awssdk.http.auth.spi.AsyncHttpSignRequest;
21+
import software.amazon.awssdk.http.auth.spi.AsyncSignedHttpRequest;
22+
import software.amazon.awssdk.http.auth.spi.SyncHttpSignRequest;
23+
import software.amazon.awssdk.http.auth.spi.SyncSignedHttpRequest;
24+
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
25+
26+
@SdkInternalApi
27+
public class DefaultAwsCrtV4aHttpSigner implements AwsCrtV4aHttpSigner {
28+
29+
@Override
30+
public SyncSignedHttpRequest sign(SyncHttpSignRequest<? extends AwsCredentialsIdentity> request) {
31+
throw new UnsupportedOperationException();
32+
}
33+
34+
@Override
35+
public AsyncSignedHttpRequest signAsync(AsyncHttpSignRequest<? extends AwsCredentialsIdentity> request) {
36+
throw new UnsupportedOperationException();
37+
}
38+
}

core/http-auth-aws/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
<artifactId>http-auth-aws</artifactId>
2929
<name>AWS Java SDK :: HTTP Auth AWS</name>
3030
<description>
31-
The AWS SDK for Java - HTTP Auth AWS module contains interfaces and implementations for generic HTTP
32-
authentication specific to AWS.
31+
The AWS SDK for Java - HTTP Auth AWS module contains interfaces and implementations for HTTP
32+
authentication specific to AWS.
3333
</description>
3434
<url>https://aws.amazon.com/sdkforjava</url>
3535

core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsS3V4HttpSigner.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,24 @@
1616
package software.amazon.awssdk.http.auth.aws;
1717

1818
import software.amazon.awssdk.annotations.SdkPublicApi;
19+
import software.amazon.awssdk.http.auth.aws.internal.DefaultAwsS3V4HttpSigner;
1920
import software.amazon.awssdk.http.auth.spi.HttpSigner;
21+
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
2022

23+
/**
24+
* An {@link HttpSigner} that will sign a request
25+
* using an AWS credentials ({@link AwsCredentialsIdentity}),
26+
* specifically for S3.
27+
*/
2128
@SdkPublicApi
22-
public interface AwsS3V4HttpSigner extends HttpSigner {
29+
public interface AwsS3V4HttpSigner extends HttpSigner<AwsCredentialsIdentity> {
2330

31+
/**
32+
* Get a default implementation of a {@link AwsS3V4HttpSigner}
33+
*
34+
* @return AwsS3V4HttpSigner
35+
*/
36+
static AwsS3V4HttpSigner create() {
37+
return new DefaultAwsS3V4HttpSigner();
38+
}
2439
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
package software.amazon.awssdk.http.auth.aws.internal;
17+
18+
import software.amazon.awssdk.annotations.SdkInternalApi;
19+
import software.amazon.awssdk.http.auth.aws.AwsS3V4HttpSigner;
20+
import software.amazon.awssdk.http.auth.spi.AsyncHttpSignRequest;
21+
import software.amazon.awssdk.http.auth.spi.AsyncSignedHttpRequest;
22+
import software.amazon.awssdk.http.auth.spi.SyncHttpSignRequest;
23+
import software.amazon.awssdk.http.auth.spi.SyncSignedHttpRequest;
24+
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
25+
26+
@SdkInternalApi
27+
public class DefaultAwsS3V4HttpSigner implements AwsS3V4HttpSigner {
28+
29+
@Override
30+
public SyncSignedHttpRequest sign(SyncHttpSignRequest<? extends AwsCredentialsIdentity> request) {
31+
throw new UnsupportedOperationException();
32+
}
33+
34+
@Override
35+
public AsyncSignedHttpRequest signAsync(AsyncHttpSignRequest<? extends AwsCredentialsIdentity> request) {
36+
throw new UnsupportedOperationException();
37+
}
38+
}

core/http-auth-event-stream/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
<artifactId>http-auth-event-stream</artifactId>
2929
<name>AWS Java SDK :: HTTP Auth Event Stream</name>
3030
<description>
31-
The AWS SDK for Java - HTTP Auth module contains interfaces and implementations for generic HTTP authentication
32-
specific to the event streams.
31+
The AWS SDK for Java - HTTP Auth Event Stream module contains interfaces and implementations
32+
for authentication of event streams in HTTP services.
3333
</description>
3434
<url>https://aws.amazon.com/sdkforjava</url>
3535

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,24 @@
1616
package software.amazon.awssdk.http.auth.eventstream;
1717

1818
import software.amazon.awssdk.annotations.SdkPublicApi;
19+
import software.amazon.awssdk.http.auth.eventstream.internal.DefaultAwsV4EventStreamHttpSigner;
1920
import software.amazon.awssdk.http.auth.spi.HttpSigner;
21+
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
2022

23+
/**
24+
* An {@link HttpSigner} that will sign a request
25+
* using an AWS credentials ({@link AwsCredentialsIdentity}),
26+
* specifically for Event Streams.
27+
*/
2128
@SdkPublicApi
22-
public interface AwsV4EventStreamHttpAuthScheme extends HttpSigner {
29+
public interface AwsV4EventStreamHttpSigner extends HttpSigner<AwsCredentialsIdentity> {
2330

31+
/**
32+
* Get a default implementation of a {@link AwsV4EventStreamHttpSigner}
33+
*
34+
* @return AwsV4EventStreamHttpSigner
35+
*/
36+
static AwsV4EventStreamHttpSigner create() {
37+
return new DefaultAwsV4EventStreamHttpSigner();
38+
}
2439
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
package software.amazon.awssdk.http.auth.eventstream.internal;
17+
18+
import software.amazon.awssdk.annotations.SdkInternalApi;
19+
import software.amazon.awssdk.http.auth.eventstream.AwsV4EventStreamHttpSigner;
20+
import software.amazon.awssdk.http.auth.spi.AsyncHttpSignRequest;
21+
import software.amazon.awssdk.http.auth.spi.AsyncSignedHttpRequest;
22+
import software.amazon.awssdk.http.auth.spi.SyncHttpSignRequest;
23+
import software.amazon.awssdk.http.auth.spi.SyncSignedHttpRequest;
24+
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
25+
26+
@SdkInternalApi
27+
public class DefaultAwsV4EventStreamHttpSigner implements AwsV4EventStreamHttpSigner {
28+
29+
@Override
30+
public SyncSignedHttpRequest sign(SyncHttpSignRequest<? extends AwsCredentialsIdentity> request) {
31+
throw new UnsupportedOperationException();
32+
}
33+
34+
@Override
35+
public AsyncSignedHttpRequest signAsync(AsyncHttpSignRequest<? extends AwsCredentialsIdentity> request) {
36+
throw new UnsupportedOperationException();
37+
}
38+
}

core/http-auth/pom.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
<artifactId>http-auth</artifactId>
2929
<name>AWS Java SDK :: HTTP Auth</name>
3030
<description>
31-
The AWS SDK for Java - HTTP Auth module contains interfaces and implementations for generic HTTP authentication
31+
The AWS SDK for Java - HTTP Auth module contains interfaces and implementations
32+
for generic HTTP authentication
3233
</description>
3334
<url>https://aws.amazon.com/sdkforjava</url>
3435

@@ -48,6 +49,17 @@
4849
<artifactId>identity-spi</artifactId>
4950
<version>${awsjavasdk.version}</version>
5051
</dependency>
52+
53+
<dependency>
54+
<groupId>org.junit.jupiter</groupId>
55+
<artifactId>junit-jupiter</artifactId>
56+
<scope>test</scope>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.assertj</groupId>
60+
<artifactId>assertj-core</artifactId>
61+
<scope>test</scope>
62+
</dependency>
5163
</dependencies>
5264

5365
<build>

core/http-auth/src/main/java/software/amazon/awssdk/http/auth/AwsV4HttpSigner.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,23 @@
1616
package software.amazon.awssdk.http.auth;
1717

1818
import software.amazon.awssdk.annotations.SdkPublicApi;
19+
import software.amazon.awssdk.http.auth.internal.DefaultAwsV4HttpSigner;
1920
import software.amazon.awssdk.http.auth.spi.HttpSigner;
21+
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
2022

23+
/**
24+
* An {@link HttpSigner} that will sign a request
25+
* using an AWS credentials ({@link AwsCredentialsIdentity}).
26+
*/
2127
@SdkPublicApi
22-
public interface AwsV4HttpSigner extends HttpSigner {
28+
public interface AwsV4HttpSigner extends HttpSigner<AwsCredentialsIdentity> {
2329

30+
/**
31+
* Get a default implementation of a {@link AwsV4HttpSigner}
32+
*
33+
* @return AwsV4HttpSigner
34+
*/
35+
static AwsV4HttpSigner create() {
36+
return new DefaultAwsV4HttpSigner();
37+
}
2438
}

core/http-auth/src/main/java/software/amazon/awssdk/http/auth/AwsV4QueryHttpSigner.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,24 @@
1616
package software.amazon.awssdk.http.auth;
1717

1818
import software.amazon.awssdk.annotations.SdkPublicApi;
19+
import software.amazon.awssdk.http.auth.internal.DefaultAwsV4QueryHttpSigner;
1920
import software.amazon.awssdk.http.auth.spi.HttpSigner;
21+
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
2022

23+
/**
24+
* An {@link HttpSigner} that will sign a request
25+
* using an AWS credentials ({@link AwsCredentialsIdentity}),
26+
* specifically for query.
27+
*/
2128
@SdkPublicApi
22-
public interface AwsV4QueryHttpSigner extends HttpSigner {
29+
public interface AwsV4QueryHttpSigner extends HttpSigner<AwsCredentialsIdentity> {
2330

31+
/**
32+
* Get a default implementation of a {@link AwsV4QueryHttpSigner}
33+
*
34+
* @return AwsV4QueryHttpSigner
35+
*/
36+
static AwsV4QueryHttpSigner create() {
37+
return new DefaultAwsV4QueryHttpSigner();
38+
}
2439
}

0 commit comments

Comments
 (0)