Skip to content

Commit

Permalink
release 3.0.8-beta source code for net
Browse files Browse the repository at this point in the history
  • Loading branch information
Huaweicloud-SDK committed Aug 15, 2020
1 parent de39489 commit ebd1d55
Show file tree
Hide file tree
Showing 157 changed files with 14,386 additions and 351 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# 3.0.8-beta 2020-8-14
## HuaweiCloud SDK Core
- ### Features
- Support temporary AK/SK authentication mode.
- ### Bug Fix
- None
- ### Change
- None

## HuaweiCloud SDK BSS
- ### Features
- Support Business Support System service.
- ### Bug Fix
- None
- ### Change
- None

## HuaweiCloud SDK KMS
- ### Features
- Support temporary Key Management Service.
- ### Bug Fix
- None
- ### Change
- None


# __3.0.7-beta__ __2020-07-30__
## HuaweiCloud SDK Core
- ### Features
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG_CN.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# 3.0.8-beta 2020-8-14
## HuaweiCloud SDK Core
- ### 新增特性
- 支持临时AK/SK认证模式
- ### 解决问题
-
- ### 特性变更
-

## HuaweiCloud SDK BSS
- ### 新增特性
- 支持密钥管理服务
- ### 解决问题
-
- ### 特性变更
-

## HuaweiCloud SDK KMS
- ### 新增特性
- 支持密钥管理服务
- ### 解决问题
-
- ### 特性变更
-


# __3.0.7-beta__ __2020-07-30__
## __HuaweiCloud SDK Core__
- ### 新增特性
Expand Down
12 changes: 12 additions & 0 deletions Core/Auth/BasicCredentials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class BasicCredentials : ICredential
private readonly string _ak;
private readonly string _sk;
private readonly string _projectId;
private string _securityToken;

public BasicCredentials(string ak, string sk, string projectId)
{
Expand All @@ -54,6 +55,12 @@ public BasicCredentials(string ak, string sk, string projectId)
this._projectId = projectId;
}

public BasicCredentials WithSecurityToken(string token)
{
this._securityToken = token;
return this;
}

public Dictionary<string, string> GetPathParamDictionary()
{
var pathParamDictionary = new Dictionary<string, string>();
Expand All @@ -71,6 +78,11 @@ public Task<HttpRequest> SignAuthRequest(HttpRequest request)
{
request.Headers.Add("X-Project-Id", _projectId);

if (_securityToken != null)
{
request.Headers.Add("X-Security-Token", _securityToken);
}

if (!IsNullOrEmpty(request.ContentType) && !request.ContentType.Contains("application/json"))
{
request.Headers.Add("X-Sdk-Content-Sha256", "UNSIGNED-PAYLOAD");
Expand Down
12 changes: 12 additions & 0 deletions Core/Auth/GlobalCredentials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class GlobalCredentials : ICredential
private readonly string _ak;
private readonly string _sk;
private readonly string _domainId;
private string _securityToken;

public GlobalCredentials(string ak, string sk, string domainId)
{
Expand All @@ -54,6 +55,12 @@ public GlobalCredentials(string ak, string sk, string domainId)
this._domainId = domainId;
}

public GlobalCredentials WithSecurityToken(string token)
{
this._securityToken = token;
return this;
}

public Dictionary<string, string> GetPathParamDictionary()
{
var pathParamDictionary = new Dictionary<string, string>();
Expand All @@ -72,6 +79,11 @@ public Task<HttpRequest> SignAuthRequest(HttpRequest request)
{
request.Headers.Add("X-Domain-Id", _domainId);

if (_securityToken != null)
{
request.Headers.Add("X-Security-Token", _securityToken);
}

if (!IsNullOrEmpty(request.ContentType) && !request.ContentType.Contains("application/json"))
{
request.Headers.Add("X-Sdk-Content-Sha256", "UNSIGNED-PAYLOAD");
Expand Down
2 changes: 1 addition & 1 deletion Core/obj/Core.csproj.nuget.cache
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"dgSpecHash": "Tbnj8CVuUvaa9gIfqoIus8/qsJivl+Qb8Em3ya5QF8zn0P/nLouNqvqttZqctF8bSOmXC/KbNlgBJDeocZf3Ng==",
"dgSpecHash": "7SJvP1CeWRitZxcgPnAu+48Ma/Vj35Bg2/tlTd7Ciooq/69rbMEeoNxi684hkHPoO/YuSqfJUzyc43EWMWc5cA==",
"success": true
}
12 changes: 6 additions & 6 deletions Core/obj/Core.csproj.nuget.dgspec.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"format": 1,
"restore": {
"/data/fuxi_ci_workspace/5f2274931fb7d9215ac255e3/Core/Core.csproj": {}
"/data/fuxi_ci_workspace/5f3776eecf2ea54c4f8827ee/Core/Core.csproj": {}
},
"projects": {
"/data/fuxi_ci_workspace/5f2274931fb7d9215ac255e3/Core/Core.csproj": {
"/data/fuxi_ci_workspace/5f3776eecf2ea54c4f8827ee/Core/Core.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/data/fuxi_ci_workspace/5f2274931fb7d9215ac255e3/Core/Core.csproj",
"projectUniqueName": "/data/fuxi_ci_workspace/5f3776eecf2ea54c4f8827ee/Core/Core.csproj",
"projectName": "HuaweiCloud.SDK.Core",
"projectPath": "/data/fuxi_ci_workspace/5f2274931fb7d9215ac255e3/Core/Core.csproj",
"projectPath": "/data/fuxi_ci_workspace/5f3776eecf2ea54c4f8827ee/Core/Core.csproj",
"packagesPath": "/root/.nuget/packages/",
"outputPath": "/data/fuxi_ci_workspace/5f2274931fb7d9215ac255e3/Core/obj/",
"outputPath": "/data/fuxi_ci_workspace/5f3776eecf2ea54c4f8827ee/Core/obj/",
"projectStyle": "PackageReference",
"fallbackFolders": [
"/usr/dotnet/sdk/NuGetFallbackFolder"
Expand All @@ -23,7 +23,7 @@
"netstandard2.0"
],
"sources": {
"/data/fuxi_ci_workspace/5f2274931fb7d9215ac255e3/package": {}
"/data/fuxi_ci_workspace/5f3776eecf2ea54c4f8827ee/package": {}
},
"frameworks": {
"netstandard2.0": {
Expand Down
2 changes: 1 addition & 1 deletion Core/obj/Core.csproj.nuget.g.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">/data/fuxi_ci_workspace/5f2274931fb7d9215ac255e3/Core/obj/project.assets.json</ProjectAssetsFile>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">/data/fuxi_ci_workspace/5f3776eecf2ea54c4f8827ee/Core/obj/project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/root/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/root/.nuget/packages/;/usr/dotnet/sdk/NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
Expand Down
8 changes: 4 additions & 4 deletions Core/obj/project.assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -3593,11 +3593,11 @@
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/data/fuxi_ci_workspace/5f2274931fb7d9215ac255e3/Core/Core.csproj",
"projectUniqueName": "/data/fuxi_ci_workspace/5f3776eecf2ea54c4f8827ee/Core/Core.csproj",
"projectName": "HuaweiCloud.SDK.Core",
"projectPath": "/data/fuxi_ci_workspace/5f2274931fb7d9215ac255e3/Core/Core.csproj",
"projectPath": "/data/fuxi_ci_workspace/5f3776eecf2ea54c4f8827ee/Core/Core.csproj",
"packagesPath": "/root/.nuget/packages/",
"outputPath": "/data/fuxi_ci_workspace/5f2274931fb7d9215ac255e3/Core/obj/",
"outputPath": "/data/fuxi_ci_workspace/5f3776eecf2ea54c4f8827ee/Core/obj/",
"projectStyle": "PackageReference",
"fallbackFolders": [
"/usr/dotnet/sdk/NuGetFallbackFolder"
Expand All @@ -3609,7 +3609,7 @@
"netstandard2.0"
],
"sources": {
"/data/fuxi_ci_workspace/5f2274931fb7d9215ac255e3/package": {}
"/data/fuxi_ci_workspace/5f3776eecf2ea54c4f8827ee/package": {}
},
"frameworks": {
"netstandard2.0": {
Expand Down
1 change: 1 addition & 0 deletions Examples/Examples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<ProjectReference Include="..\Services\IoTDA\IoTDA.csproj" />
<ProjectReference Include="..\Services\Classroom\Classroom.csproj" />
<ProjectReference Include="..\Services\Dcs\Dcs.csproj" />
<ProjectReference Include="..\Services\Kms\Kms.csproj" />
</ItemGroup>

</Project>
Loading

0 comments on commit ebd1d55

Please sign in to comment.