Add GetAuthToken OpenAPI.

This commit is contained in:
sdk-team
2020-06-18 15:38:53 +08:00
parent e611ec2db4
commit 2070ee03ba
9 changed files with 341 additions and 4 deletions

View File

@@ -28,6 +28,8 @@
#include "model/DeleteVerifySchemeResult.h"
#include "model/DescribeVerifySchemeRequest.h"
#include "model/DescribeVerifySchemeResult.h"
#include "model/GetAuthTokenRequest.h"
#include "model/GetAuthTokenResult.h"
#include "model/GetMobileRequest.h"
#include "model/GetMobileResult.h"
#include "model/TwiceTelVerifyRequest.h"
@@ -54,6 +56,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DescribeVerifySchemeResult> DescribeVerifySchemeOutcome;
typedef std::future<DescribeVerifySchemeOutcome> DescribeVerifySchemeOutcomeCallable;
typedef std::function<void(const DypnsapiClient*, const Model::DescribeVerifySchemeRequest&, const DescribeVerifySchemeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeVerifySchemeAsyncHandler;
typedef Outcome<Error, Model::GetAuthTokenResult> GetAuthTokenOutcome;
typedef std::future<GetAuthTokenOutcome> GetAuthTokenOutcomeCallable;
typedef std::function<void(const DypnsapiClient*, const Model::GetAuthTokenRequest&, const GetAuthTokenOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAuthTokenAsyncHandler;
typedef Outcome<Error, Model::GetMobileResult> GetMobileOutcome;
typedef std::future<GetMobileOutcome> GetMobileOutcomeCallable;
typedef std::function<void(const DypnsapiClient*, const Model::GetMobileRequest&, const GetMobileOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetMobileAsyncHandler;
@@ -80,6 +85,9 @@ namespace AlibabaCloud
DescribeVerifySchemeOutcome describeVerifyScheme(const Model::DescribeVerifySchemeRequest &request)const;
void describeVerifySchemeAsync(const Model::DescribeVerifySchemeRequest& request, const DescribeVerifySchemeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeVerifySchemeOutcomeCallable describeVerifySchemeCallable(const Model::DescribeVerifySchemeRequest& request) const;
GetAuthTokenOutcome getAuthToken(const Model::GetAuthTokenRequest &request)const;
void getAuthTokenAsync(const Model::GetAuthTokenRequest& request, const GetAuthTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetAuthTokenOutcomeCallable getAuthTokenCallable(const Model::GetAuthTokenRequest& request) const;
GetMobileOutcome getMobile(const Model::GetMobileRequest &request)const;
void getMobileAsync(const Model::GetMobileRequest& request, const GetMobileAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetMobileOutcomeCallable getMobileCallable(const Model::GetMobileRequest& request) const;

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_DYPNSAPI_MODEL_GETAUTHTOKENREQUEST_H_
#define ALIBABACLOUD_DYPNSAPI_MODEL_GETAUTHTOKENREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/dypnsapi/DypnsapiExport.h>
namespace AlibabaCloud
{
namespace Dypnsapi
{
namespace Model
{
class ALIBABACLOUD_DYPNSAPI_EXPORT GetAuthTokenRequest : public RpcServiceRequest
{
public:
GetAuthTokenRequest();
~GetAuthTokenRequest();
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getOrigin()const;
void setOrigin(const std::string& origin);
long getOwnerId()const;
void setOwnerId(long ownerId);
std::string getUrl()const;
void setUrl(const std::string& url);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
private:
long resourceOwnerId_;
std::string resourceOwnerAccount_;
std::string origin_;
long ownerId_;
std::string url_;
std::string accessKeyId_;
};
}
}
}
#endif // !ALIBABACLOUD_DYPNSAPI_MODEL_GETAUTHTOKENREQUEST_H_

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_DYPNSAPI_MODEL_GETAUTHTOKENRESULT_H_
#define ALIBABACLOUD_DYPNSAPI_MODEL_GETAUTHTOKENRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/dypnsapi/DypnsapiExport.h>
namespace AlibabaCloud
{
namespace Dypnsapi
{
namespace Model
{
class ALIBABACLOUD_DYPNSAPI_EXPORT GetAuthTokenResult : public ServiceResult
{
public:
struct TokenInfo
{
std::string jwtToken;
std::string accessToken;
};
GetAuthTokenResult();
explicit GetAuthTokenResult(const std::string &payload);
~GetAuthTokenResult();
std::string getMessage()const;
TokenInfo getTokenInfo()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
TokenInfo tokenInfo_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_DYPNSAPI_MODEL_GETAUTHTOKENRESULT_H_