Skip to content

Commit

Permalink
Add useragent for OIDC assume role
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian committed Jul 23, 2024
1 parent f8cf820 commit ff35adf
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.aliyuncs.http.HttpRequest;
import com.aliyuncs.http.HttpResponse;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.http.UserAgentConfig;
import com.aliyuncs.http.clients.CompatibleUrlConnClient;
import com.aliyuncs.utils.ParameterHelper;
import com.aliyuncs.utils.StringUtils;
Expand Down Expand Up @@ -147,6 +148,7 @@ private String invokeAssumeRoleWithOIDC() throws ClientException {
httpRequest.setHttpContentType(FormatType.FORM);
httpRequest.setSysConnectTimeout(1000);
httpRequest.setSysReadTimeout(3000);
httpRequest.putHeaderParameter("UserAgent", UserAgentConfig.resolve(null, null));
String oidcToken;
FileInputStream in = null;
byte[] buffer;
Expand Down

0 comments on commit ff35adf

Please sign in to comment.