Support APP auth.

This commit is contained in:
sdk-team
2021-07-08 04:02:55 +00:00
parent ff3b6aec0a
commit 34d72f2b3b
5 changed files with 16 additions and 4 deletions

View File

@@ -1,3 +1,6 @@
2021-07-08 Version: 1.36.813
- Support APP auth.
2021-07-08 Version: 1.36.812 2021-07-08 Version: 1.36.812
- Generated 2016-11-01 for `live`. - Generated 2016-11-01 for `live`.

View File

@@ -1 +1 @@
1.36.812 1.36.813

View File

@@ -34,6 +34,9 @@ namespace AlibabaCloud
public: public:
struct Data struct Data
{ {
std::string publicKey;
std::string signature;
std::string license;
std::string rid; std::string rid;
}; };

View File

@@ -31,21 +31,21 @@ Moguan_sdkClient::Moguan_sdkClient(const Credentials &credentials, const ClientC
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration) RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{ {
auto locationClient = std::make_shared<LocationClient>(credentials, configuration); auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "visionai"); endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
} }
Moguan_sdkClient::Moguan_sdkClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) : Moguan_sdkClient::Moguan_sdkClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{ {
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration); auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "visionai"); endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
} }
Moguan_sdkClient::Moguan_sdkClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : Moguan_sdkClient::Moguan_sdkClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration) RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{ {
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration); auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "visionai"); endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
} }
Moguan_sdkClient::~Moguan_sdkClient() Moguan_sdkClient::~Moguan_sdkClient()

View File

@@ -42,6 +42,12 @@ void RegisterDeviceResult::parse(const std::string &payload)
auto dataNode = value["Data"]; auto dataNode = value["Data"];
if(!dataNode["Rid"].isNull()) if(!dataNode["Rid"].isNull())
data_.rid = dataNode["Rid"].asString(); data_.rid = dataNode["Rid"].asString();
if(!dataNode["License"].isNull())
data_.license = dataNode["License"].asString();
if(!dataNode["Signature"].isNull())
data_.signature = dataNode["Signature"].asString();
if(!dataNode["PublicKey"].isNull())
data_.publicKey = dataNode["PublicKey"].asString();
if(!value["Message"].isNull()) if(!value["Message"].isNull())
message_ = value["Message"].asString(); message_ = value["Message"].asString();
if(!value["ErrorCode"].isNull()) if(!value["ErrorCode"].isNull())