azure-sdk-for-cpp/samples/helpers/service/src/client.cpp
Rick Winter b54d509c72
Use standard syntax for MIT license (#4786)
* Use standard syntax for MIT license

* Stop appending "All rights reserved"
2023-07-12 22:37:36 -07:00

25 lines
865 B
C++

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#include "azure/service/client.hpp"
void Azure::Service::Client::DoSomething(const Azure::Core::Context& context) const
{
static_cast<void>(context); // to suppress the "unused variable" warning.
// An oversimplified logic of what a typical Azure SDK client does is below:
#if (0)
// Every client has its own scope. We use management.azure.com here as an example.
Core::Credentials::TokenRequestContext azureServiceClientContext;
azureServiceClientContext.Scopes = {"https://management.azure.com/"};
auto authenticationToken = m_credential->GetToken(azureServiceClientContext, context);
// Now that it has a token, Client can authorize and DoSomething().
// ...
// ...
static_cast<void>(authenticationToken); // to suppress the "unused variable" warning.
#endif
}