Skip to content

Commit ce8f362

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

File tree

19 files changed

+315
-48
lines changed

19 files changed

+315
-48
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: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@
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

2123
@SdkPublicApi
22-
public interface AwsCrtV4aHttpAuthScheme extends HttpSigner {
23-
24+
public interface AwsCrtS3V4aHttpSigner extends HttpSigner<AwsCredentialsIdentity> {
25+
static AwsCrtS3V4aHttpSigner create() {
26+
return new DefaultAwsCrtS3V4aHttpSigner();
27+
}
2428
}
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@
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

2123
@SdkPublicApi
22-
public interface AwsCrtS3V4aHttpAuthScheme extends HttpSigner {
23-
24+
public interface AwsCrtV4aHttpSigner extends HttpSigner<AwsCredentialsIdentity> {
25+
static AwsCrtV4aHttpSigner create() {
26+
return new DefaultAwsCrtV4aHttpSigner();
27+
}
2428
}
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: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@
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

2123
@SdkPublicApi
22-
public interface AwsS3V4HttpSigner extends HttpSigner {
23-
24+
public interface AwsS3V4HttpSigner extends HttpSigner<AwsCredentialsIdentity> {
25+
static AwsS3V4HttpSigner create() {
26+
return new DefaultAwsS3V4HttpSigner();
27+
}
2428
}
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: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@
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

2123
@SdkPublicApi
22-
public interface AwsV4EventStreamHttpAuthScheme extends HttpSigner {
23-
24+
public interface AwsV4EventStreamHttpSigner extends HttpSigner<AwsCredentialsIdentity> {
25+
static AwsV4EventStreamHttpSigner create() {
26+
return new DefaultAwsV4EventStreamHttpSigner();
27+
}
2428
}
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: 2 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

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@
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 a AWS credentials ({@link AwsCredentialsIdentity}).
26+
*/
2127
@SdkPublicApi
22-
public interface AwsV4HttpSigner extends HttpSigner {
23-
28+
public interface AwsV4HttpSigner extends HttpSigner<AwsCredentialsIdentity> {
29+
static AwsV4HttpSigner create() {
30+
return new DefaultAwsV4HttpSigner();
31+
}
2432
}

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@
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

2123
@SdkPublicApi
22-
public interface AwsV4QueryHttpSigner extends HttpSigner {
23-
24+
public interface AwsV4QueryHttpSigner extends HttpSigner<AwsCredentialsIdentity> {
25+
static AwsV4QueryHttpSigner create() {
26+
return new DefaultAwsV4QueryHttpSigner();
27+
}
2428
}

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,18 @@
2121
import software.amazon.awssdk.identity.spi.TokenIdentity;
2222

2323
/**
24-
* An {@link HttpSigner} that will sign a request with Bearer token
25-
* authorization.
24+
* An {@link HttpSigner} that will sign a request with a
25+
* bearer-token ({@link TokenIdentity}).
2626
*/
2727
@SdkPublicApi
28-
public interface BearerHttpSigner extends HttpSigner {
28+
public interface BearerHttpSigner extends HttpSigner<TokenIdentity> {
2929

30-
static BearerHttpSigner create(TokenIdentity tokenIdentity) {
31-
return new DefaultBearerHttpSigner(tokenIdentity);
30+
/**
31+
* Get a default implementation of a {@link BearerHttpSigner}
32+
*
33+
* @return BearerHttpSigner
34+
*/
35+
static BearerHttpSigner create() {
36+
return new DefaultBearerHttpSigner();
3237
}
3338
}
Lines changed: 38 additions & 0 deletions
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.internal;
17+
18+
import software.amazon.awssdk.annotations.SdkInternalApi;
19+
import software.amazon.awssdk.http.auth.AwsV4HttpSigner;
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 DefaultAwsV4HttpSigner implements AwsV4HttpSigner {
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+
}

0 commit comments

Comments
 (0)