File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
src/main/java/software/amazon/awssdk/services/signin/internal Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 5656 <artifactId >http-auth-aws</artifactId >
5757 <version >${awsjavasdk.version} </version >
5858 </dependency >
59+ <dependency >
60+ <groupId >software.amazon.awssdk</groupId >
61+ <artifactId >profiles</artifactId >
62+ <version >${awsjavasdk.version} </version >
63+ </dependency >
5964 </dependencies >
6065</project >
Original file line number Diff line number Diff line change 2121import software .amazon .awssdk .annotations .SdkInternalApi ;
2222import software .amazon .awssdk .core .SdkPlugin ;
2323import software .amazon .awssdk .core .SdkServiceClientConfiguration ;
24+ import software .amazon .awssdk .core .exception .SdkClientException ;
2425import software .amazon .awssdk .http .auth .spi .scheme .AuthSchemeOption ;
2526import software .amazon .awssdk .http .auth .spi .scheme .AuthSchemeProvider ;
2627import software .amazon .awssdk .identity .spi .IdentityProvider ;
@@ -63,7 +64,11 @@ public void configureClient(SdkServiceClientConfiguration.Builder config) {
6364 // the refresh request takes the clientId/refreshToken sourced from the access token on disk as input
6465 // so we must sign the request with the dpopKey loaded from the same load. IE: do not read the
6566 // access token file twice!
66- scb .putAuthScheme (DpopAuthScheme .create (StaticDpopIdentityProvider .create (dpopKeyPem )));
67+ try {
68+ scb .putAuthScheme (DpopAuthScheme .create (StaticDpopIdentityProvider .create (dpopKeyPem )));
69+ } catch (Exception e ) {
70+ throw SdkClientException .create ("Unable to refresh Login credentials. Please reauthenticate " , e );
71+ }
6772 }
6873
6974 private static class DpopAuthSchemeProvider implements SigninAuthSchemeProvider {
Original file line number Diff line number Diff line change @@ -121,7 +121,6 @@ private static class ParsedEcKey {
121121 byte [] publicBytes ;
122122 }
123123
124-
125124 /**
126125 * Follows the SEC1 / RFC 5915 ASN.1 format: PrivateKeyInfo ::= SEQUENCE { version INTEGER (0), privateKeyAlgorithm
127126 * AlgorithmIdentifier, -- ecPublicKey + curve OID privateKey OCTET STRING -- contains the SEC1 DER parameters [0]
You can’t perform that action at this time.
0 commit comments