Skip to content

Commit a414d6e

Browse files
committed
Remove changes to IdentityProvider & IdentityProviderChain. Override CredentialsProviderChain toString
1 parent 230ff4f commit a414d6e

File tree

6 files changed

+4
-35
lines changed

6 files changed

+4
-35
lines changed

runtime/auth/aws-credentials/api/aws-credentials.api

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ public final class aws/smithy/kotlin/runtime/auth/awscredentials/CachedCredentia
22
public synthetic fun <init> (Laws/smithy/kotlin/runtime/auth/awscredentials/CredentialsProvider;JJLaws/smithy/kotlin/runtime/time/Clock;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
33
public synthetic fun <init> (Laws/smithy/kotlin/runtime/auth/awscredentials/CredentialsProvider;JJLaws/smithy/kotlin/runtime/time/Clock;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
44
public fun close ()V
5-
public fun getProviderName ()Ljava/lang/String;
65
public fun resolve (Laws/smithy/kotlin/runtime/collections/Attributes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
76
}
87

@@ -15,10 +14,6 @@ public final class aws/smithy/kotlin/runtime/auth/awscredentials/CachedCredentia
1514
public abstract interface class aws/smithy/kotlin/runtime/auth/awscredentials/CloseableCredentialsProvider : aws/smithy/kotlin/runtime/auth/awscredentials/CredentialsProvider, java/io/Closeable {
1615
}
1716

18-
public final class aws/smithy/kotlin/runtime/auth/awscredentials/CloseableCredentialsProvider$DefaultImpls {
19-
public static fun getProviderName (Laws/smithy/kotlin/runtime/auth/awscredentials/CloseableCredentialsProvider;)Ljava/lang/String;
20-
}
21-
2217
public abstract interface class aws/smithy/kotlin/runtime/auth/awscredentials/Credentials : aws/smithy/kotlin/runtime/identity/Identity {
2318
public static final field Companion Laws/smithy/kotlin/runtime/auth/awscredentials/Credentials$Companion;
2419
public abstract fun getAccessKeyId ()Ljava/lang/String;
@@ -46,14 +41,11 @@ public abstract interface class aws/smithy/kotlin/runtime/auth/awscredentials/Cr
4641
public abstract fun resolve (Laws/smithy/kotlin/runtime/collections/Attributes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
4742
}
4843

49-
public final class aws/smithy/kotlin/runtime/auth/awscredentials/CredentialsProvider$DefaultImpls {
50-
public static fun getProviderName (Laws/smithy/kotlin/runtime/auth/awscredentials/CredentialsProvider;)Ljava/lang/String;
51-
}
52-
5344
public final class aws/smithy/kotlin/runtime/auth/awscredentials/CredentialsProviderChain : aws/smithy/kotlin/runtime/identity/IdentityProviderChain, aws/smithy/kotlin/runtime/auth/awscredentials/CredentialsProvider {
5445
public fun <init> (Ljava/util/List;)V
5546
public fun <init> ([Laws/smithy/kotlin/runtime/auth/awscredentials/CredentialsProvider;)V
5647
public fun resolve (Laws/smithy/kotlin/runtime/collections/Attributes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
48+
public fun toString ()Ljava/lang/String;
5749
}
5850

5951
public abstract interface class aws/smithy/kotlin/runtime/auth/awscredentials/CredentialsProviderConfig {

runtime/auth/aws-credentials/common/src/aws/smithy/kotlin/runtime/auth/awscredentials/CredentialsProviderChain.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ public class CredentialsProviderChain(vararg providers: CredentialsProvider) :
2121
public constructor(providers: List<CredentialsProvider>) : this(*providers.toTypedArray())
2222

2323
override suspend fun resolve(attributes: Attributes): Credentials = super.resolve(attributes)
24+
25+
override fun toString(): String = providers.joinToString(" -> ")
2426
}

runtime/auth/http-auth/api/http-auth.api

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ public final class aws/smithy/kotlin/runtime/http/auth/AnonymousIdentity : aws/s
1818

1919
public final class aws/smithy/kotlin/runtime/http/auth/AnonymousIdentityProvider : aws/smithy/kotlin/runtime/identity/IdentityProvider {
2020
public static final field INSTANCE Laws/smithy/kotlin/runtime/http/auth/AnonymousIdentityProvider;
21-
public fun getProviderName ()Ljava/lang/String;
2221
public fun resolve (Laws/smithy/kotlin/runtime/collections/Attributes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
2322
}
2423

@@ -37,10 +36,6 @@ public abstract interface class aws/smithy/kotlin/runtime/http/auth/BearerTokenP
3736
public abstract fun resolve (Laws/smithy/kotlin/runtime/collections/Attributes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
3837
}
3938

40-
public final class aws/smithy/kotlin/runtime/http/auth/BearerTokenProvider$DefaultImpls {
41-
public static fun getProviderName (Laws/smithy/kotlin/runtime/http/auth/BearerTokenProvider;)Ljava/lang/String;
42-
}
43-
4439
public final class aws/smithy/kotlin/runtime/http/auth/BearerTokenProviderChain : aws/smithy/kotlin/runtime/identity/IdentityProviderChain, aws/smithy/kotlin/runtime/http/auth/BearerTokenProvider {
4540
public fun <init> (Ljava/util/List;)V
4641
public fun <init> ([Laws/smithy/kotlin/runtime/http/auth/BearerTokenProvider;)V
@@ -64,7 +59,3 @@ public final class aws/smithy/kotlin/runtime/http/auth/BearerTokenSigner : aws/s
6459
public abstract interface class aws/smithy/kotlin/runtime/http/auth/CloseableBearerTokenProvider : aws/smithy/kotlin/runtime/http/auth/BearerTokenProvider, java/io/Closeable {
6560
}
6661

67-
public final class aws/smithy/kotlin/runtime/http/auth/CloseableBearerTokenProvider$DefaultImpls {
68-
public static fun getProviderName (Laws/smithy/kotlin/runtime/http/auth/CloseableBearerTokenProvider;)Ljava/lang/String;
69-
}
70-

runtime/auth/identity-api/api/identity-api.api

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ public abstract interface class aws/smithy/kotlin/runtime/auth/AuthSchemeProvide
4040
public abstract interface class aws/smithy/kotlin/runtime/identity/CloseableIdentityProvider : aws/smithy/kotlin/runtime/identity/IdentityProvider, java/io/Closeable {
4141
}
4242

43-
public final class aws/smithy/kotlin/runtime/identity/CloseableIdentityProvider$DefaultImpls {
44-
public static fun getProviderName (Laws/smithy/kotlin/runtime/identity/CloseableIdentityProvider;)Ljava/lang/String;
45-
}
46-
4743
public abstract interface class aws/smithy/kotlin/runtime/identity/Identity {
4844
public abstract fun getAttributes ()Laws/smithy/kotlin/runtime/collections/Attributes;
4945
public abstract fun getExpiration ()Laws/smithy/kotlin/runtime/time/Instant;
@@ -59,19 +55,16 @@ public final class aws/smithy/kotlin/runtime/identity/IdentityAttributesKt {
5955
}
6056

6157
public abstract interface class aws/smithy/kotlin/runtime/identity/IdentityProvider {
62-
public abstract fun getProviderName ()Ljava/lang/String;
6358
public abstract fun resolve (Laws/smithy/kotlin/runtime/collections/Attributes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
6459
}
6560

6661
public final class aws/smithy/kotlin/runtime/identity/IdentityProvider$DefaultImpls {
67-
public static fun getProviderName (Laws/smithy/kotlin/runtime/identity/IdentityProvider;)Ljava/lang/String;
6862
public static synthetic fun resolve$default (Laws/smithy/kotlin/runtime/identity/IdentityProvider;Laws/smithy/kotlin/runtime/collections/Attributes;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
6963
}
7064

7165
public abstract class aws/smithy/kotlin/runtime/identity/IdentityProviderChain : aws/smithy/kotlin/runtime/identity/CloseableIdentityProvider {
7266
public fun <init> ([Laws/smithy/kotlin/runtime/identity/IdentityProvider;)V
7367
public fun close ()V
74-
public fun getProviderName ()Ljava/lang/String;
7568
protected final fun getProviders ()[Laws/smithy/kotlin/runtime/identity/IdentityProvider;
7669
public fun resolve (Laws/smithy/kotlin/runtime/collections/Attributes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
7770
public fun toString ()Ljava/lang/String;

runtime/auth/identity-api/common/src/aws/smithy/kotlin/runtime/identity/IdentityProvider.kt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@ public interface IdentityProvider {
2020
* @return An [Identity] that can be used to connect to the service
2121
*/
2222
public suspend fun resolve(attributes: Attributes = emptyAttributes()): Identity
23-
24-
/**
25-
* The name of the identity provider.
26-
*
27-
* It ensures that the name is still available even if the identity provider is wrapped or decorated.
28-
* By default, it returns `null`, but implementations can override it to provide a meaningful name.
29-
*/
30-
public val providerName: String?
31-
get() = null
3223
}
3324

3425
/**

runtime/auth/identity-api/common/src/aws/smithy/kotlin/runtime/identity/IdentityProviderChain.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public abstract class IdentityProviderChain<P : IdentityProvider, I : Identity>(
2929
require(providers.isNotEmpty()) { "at least one provider must be in the chain" }
3030
}
3131
override fun toString(): String =
32-
(listOf(this) + providers).map { it.providerName ?: it::class.simpleName }.joinToString(" -> ")
32+
(listOf(this) + providers).map { it::class.simpleName }.joinToString(" -> ")
3333

3434
override suspend fun resolve(attributes: Attributes): I = withSpan<IdentityProviderChain<*, *>, I>("ResolveIdentityChain") {
3535
val logger = coroutineContext.logger<IdentityProviderChain<*, *>>()

0 commit comments

Comments
 (0)