Add patch for client credential support to cpprest package.#443
Add patch for client credential support to cpprest package.#443abeltrano wants to merge 4 commits intomicrosoft:1.0-devfrom
Conversation
There was a problem hiding this comment.
spec-lint checks required this change, and the others where existing lines in this file were moved.
390793a to
25fea6a
Compare
| DAT(state, "state") | ||
| diff --git a/Release/include/cpprest/oauth2.h b/Release/include/cpprest/oauth2.h | ||
| index 693ebbe3..68a7c7b9 100644 | ||
| --- a/Release/include/cpprest/oauth2.h |
There was a problem hiding this comment.
Is this a public API change?
There was a problem hiding this comment.
This particular change to http_constants.dat is part of a private header (include/cpprest/details), so no. This adds a const std::string to a private helper class, as below (note the details namespace):
/// oAuth 2.0 library.
namespace oauth2
{
namespace details
{
class oauth2_handler;
// Constant strings for OAuth 2.0.
typedef utility::string_t oauth2_string;
class oauth2_strings
{
public:
#define _OAUTH2_STRINGS
#define DAT(a_, b_) _ASYNCRTIMP static const oauth2_string a_;
#include "cpprest/details/http_constants.dat"
#undef _OAUTH2_STRINGS
#undef DAT
};
} // namespace details
To add some more color, the added constant client_credentials is used in the impl of a newly added public function token_from_client_credentials() to add a uri parameter requiring a specific name for the oauth2 protocol. Since this is a new function that must be called explicitly, there should be no way for it to cause back-compat issues.
|
After discussion with @jslobodzian, we'll rescind this PR until the change is accepted in the upstream cpprest repo. |
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
./cgmanifest.json,./toolkit/tools/cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json)./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md,./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassbuild-packagesmake target to work, so instead, rebuilt this package usingrpmbuilddirectly.Summary
Add support for OAuth2 client credentials grant type to the cpprest package. This grant type is commonly used in the absence of a user, so is useful for applications involving IoT devices.
Change Log
Does this affect the toolchain?
NO
Associated issues
Test Methodology