This commit is contained in:
keita
2022-04-24 11:11:11 +09:00
parent 84ba888c3a
commit 1644e4e624
2 changed files with 2 additions and 3 deletions
-1
View File
@@ -3,7 +3,6 @@
#include <cocoatweet/authentication/bearer.h> #include <cocoatweet/authentication/bearer.h>
#include <cocoatweet/authentication/plain.h> #include <cocoatweet/authentication/plain.h>
namespace CocoaTweet::API { namespace CocoaTweet::API {
API::API(CocoaTweet::Authentication::Key _key) { API::API(CocoaTweet::Authentication::Key _key) {
swapKey(_key); swapKey(_key);
+2 -2
View File
@@ -18,9 +18,9 @@ const CocoaTweet::API::Model::OAuthToken InvalidateToken::process(
auto oauth = std::make_shared<CocoaTweet::Authentication::OAuth1>(key); auto oauth = std::make_shared<CocoaTweet::Authentication::OAuth1>(key);
CocoaTweet::API::Model::OAuthToken oauthToken; CocoaTweet::API::Model::OAuthToken oauthToken;
HttpPost::process(oauth, [&oauthToken](const std::string& _rcv) { HttpPost::process(oauth, [&oauthToken](const std::string& _rcv) {
std::cout << _rcv << std::endl; std::cout << _rcv << std::endl;
auto j = nlohmann::json::parse(_rcv); auto j = nlohmann::json::parse(_rcv);
oauthToken.oauthToken(j["access_token"]); oauthToken.oauthToken(j["access_token"]);
}); });
return oauthToken; return oauthToken;
} }