File tree 1 file changed +5
-1
lines changed
core/auth/src/main/java/software/amazon/awssdk/auth/credentials/internal 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 19
19
import software .amazon .awssdk .annotations .SdkInternalApi ;
20
20
import software .amazon .awssdk .auth .credentials .WebIdentityTokenCredentialsProviderFactory ;
21
21
import software .amazon .awssdk .core .internal .util .ClassLoaderHelper ;
22
+ import software .amazon .awssdk .utils .Logger ;
22
23
23
24
/**
24
25
* Utility class used to configure credential providers based on JWT web identity tokens.
25
26
*/
26
27
@ SdkInternalApi
27
28
public final class WebIdentityCredentialsUtils {
29
+ private static final Logger log = Logger .loggerFor (WebIdentityCredentialsUtils .class );
28
30
29
31
private static final String STS_WEB_IDENTITY_CREDENTIALS_PROVIDER_FACTORY =
30
32
"software.amazon.awssdk.services.sts.internal.StsWebIdentityCredentialsProviderFactory" ;
@@ -44,7 +46,9 @@ public static WebIdentityTokenCredentialsProviderFactory factory() {
44
46
WebIdentityCredentialsUtils .class );
45
47
return (WebIdentityTokenCredentialsProviderFactory ) stsCredentialsProviderFactory .getConstructor ().newInstance ();
46
48
} catch (ClassNotFoundException e ) {
47
- throw new IllegalStateException ("To use web identity tokens, the 'sts' service module must be on the class path." , e );
49
+ String message = "To use web identity tokens, the 'sts' service module must be on the class path." ;
50
+ log .warn (() -> message );
51
+ throw new IllegalStateException (message , e );
48
52
} catch (NoSuchMethodException | InvocationTargetException | InstantiationException | IllegalAccessException e ) {
49
53
throw new IllegalStateException ("Failed to create a web identity token credentials provider." , e );
50
54
}
You can’t perform that action at this time.
0 commit comments