Skip to content

Commit cd22005

Browse files
committed
Add AuthSchemeProvider marker interface
This is needed for setting authSchemeProvider client configuration option.
1 parent c197b12 commit cd22005

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

codegen/src/main/java/software/amazon/awssdk/codegen/poet/authscheme/AuthSchemeProviderSpec.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import software.amazon.awssdk.codegen.model.intermediate.IntermediateModel;
2828
import software.amazon.awssdk.codegen.poet.ClassSpec;
2929
import software.amazon.awssdk.codegen.poet.PoetUtils;
30+
import software.amazon.awssdk.http.auth.spi.AuthSchemeProvider;
3031
import software.amazon.awssdk.http.auth.spi.HttpAuthOption;
3132

3233
public class AuthSchemeProviderSpec implements ClassSpec {
@@ -46,7 +47,7 @@ public ClassName className() {
4647
@Override
4748
public TypeSpec poetSpec() {
4849
return PoetUtils.createInterfaceBuilder(className())
49-
// .addSuperinterface(EndpointProvider.class) // TODO: reviewer: do we want a marker interface?
50+
.addSuperinterface(AuthSchemeProvider.class)
5051
.addModifiers(Modifier.PUBLIC)
5152
.addAnnotation(SdkPublicApi.class)
5253
.addJavadoc(interfaceJavadoc())

codegen/src/test/resources/software/amazon/awssdk/codegen/poet/authscheme/auth-scheme-provider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
import java.util.function.Consumer;
55
import software.amazon.awssdk.annotations.Generated;
66
import software.amazon.awssdk.annotations.SdkPublicApi;
7+
import software.amazon.awssdk.http.auth.spi.AuthSchemeProvider;
78
import software.amazon.awssdk.http.auth.spi.HttpAuthOption;
89
import software.amazon.awssdk.services.query.authscheme.internal.DefaultQueryAuthSchemeProvider;
910

10-
1111
/**
1212
* An auth scheme provider for Query. The auth scheme provider takes a set of parameters using
1313
* {@link QueryAuthSchemeParams}, and resolves a list of {@link HttpAuthOption} based on the given parameters.
1414
*/
1515
@Generated("software.amazon.awssdk:codegen")
1616
@SdkPublicApi
17-
public interface QueryAuthSchemeProvider {
17+
public interface QueryAuthSchemeProvider extends AuthSchemeProvider {
1818
/**
1919
* Resolve the auth schemes based on the given set of parameters.
2020
*/
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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.spi;
17+
18+
import software.amazon.awssdk.annotations.SdkPublicApi;
19+
20+
/**
21+
* A marker interface for an auth scheme provider. An auth scheme provider takes as input a set of service-specific parameters,
22+
* and resolves a list of {@link HttpAuthOption} based on the given parameters.
23+
*/
24+
@SdkPublicApi
25+
public interface AuthSchemeProvider {
26+
}

0 commit comments

Comments
 (0)