-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: solve the inconsistency of credentials refresh && add the m… #49
Conversation
a52c457
to
c49b9f3
Compare
50b4c9a
to
db30f7d
Compare
public String STSEndpoint; | ||
public String STSEndpoint = "sts.aliyuncs.com"; | ||
@NameInMap("asyncCredentialUpdateEnabled") | ||
public boolean asyncCredentialUpdateEnabled = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个需要对外暴露吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯嗯,现在的设计是支持阻塞、非阻塞两种刷新,非阻塞的刷新其实是推荐的
return new Builder(); | ||
} | ||
|
||
public Credential setAccessKeyId(String accessKeyId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有了 builder setXXX 是不是就不需要了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
本应该不需要的,但是这个credential是Model,model的设计是setters进行配置,这个只能看看darabonba v2要不要去掉
@@ -61,7 +61,7 @@ public void createCredentialTest() { | |||
response.setHttpContent(new String("{\"SessionAccessKey\":{\"Expiration\":\"2019-12-12T1:1:1Z\",\"SessionAccessKeyId\":\"test\"," + | |||
"\"SessionAccessKeySecret\":\"test\"}}").getBytes(), "UTF-8", FormatType.JSON); | |||
when(client.syncInvoke(ArgumentMatchers.<HttpRequest>any())).thenReturn(response); | |||
Assert.assertTrue(provider.createCredential(client) instanceof RsaKeyPairCredential); | |||
Assert.assertEquals(AuthConstant.RSA_KEY_PAIR, provider.createCredential(client).value().getType()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
老的测试 是不是不该动啊
@@ -62,7 +62,8 @@ | |||
<dependency> | |||
<groupId>com.aliyun</groupId> | |||
<artifactId>tea</artifactId> | |||
<version>1.0.6</version> | |||
<version>1.2.7</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
跳度这么大么
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯嗯,现在稳定版本是1.2.7
91ef469
to
61a0773
Compare
9ce8075
to
fbbe5fa
Compare
Codecov Report
@@ Coverage Diff @@
## master #49 +/- ##
============================================
- Coverage 87.88% 84.42% -3.46%
- Complexity 457 482 +25
============================================
Files 39 44 +5
Lines 1304 1740 +436
Branches 94 111 +17
============================================
+ Hits 1146 1469 +323
- Misses 136 234 +98
- Partials 22 37 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
|
fbbe5fa
to
8e29ef5
Compare
8e29ef5
to
a6481d9
Compare
…ethod of asynchronous refresh
a6481d9
to
e9493f7
Compare
…ethod of asynchronous refresh
You need to complete