Граф коммитов

38 Коммитов

Автор SHA1 Сообщение Дата
Ronnie Geraghty 382efbd7fd
Moving sample files to cpp sdk repo (#5947)
* Moving sample files to cpp sdk repo

* Fixed spelling and markdown formatting

* Fixes for links

* added new lines to the end of files

* Update samples/integration/cmake-vcpkg/.gitignore

Co-authored-by: Rick Winter <rick.winter@microsoft.com>

* Update samples/integration/cmake-vcpkg/README.md

Co-authored-by: Rick Winter <rick.winter@microsoft.com>

* Update samples/integration/cmake-vcpkg/README.md

Co-authored-by: Rick Winter <rick.winter@microsoft.com>

* Update samples/integration/cmake-vcpkg/README.md

Co-authored-by: Rick Winter <rick.winter@microsoft.com>

* updates from feedback

* Updates to sample code to use default azure cred

* Update samples/integration/cmake-vcpkg/main.cpp

Co-authored-by: Rick Winter <rick.winter@microsoft.com>

---------

Co-authored-by: Rick Winter <rick.winter@microsoft.com>
2024-09-13 15:29:29 -07:00
Anton Kolesnyk 0f62b3aa63
Add consumption-time value of __cplusplus to User-Agent (#5662)
* Add consumption-time value of __cplusplus to User-Agent

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-07-29 18:31:51 -07:00
Larry Osterman 90089ad326
Cleaned up Azure::Core::Context API surface (#5676)
* Deprecated Azure::Core::ApplicationContext because its use is confusing and inconsistent with the original design. 

---------

Co-authored-by: Rick Winter <rick.winter@microsoft.com>
Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2024-07-17 12:38:30 -07:00
Ronnie Geraghty 1d09c535b2
Install Docs Updates (#5339)
* initial update

* moving instructions on using betas to integration samples

* added requirements section, more options for addition install and config methods, build and run instructions and removed old install and config instructions

* spell check fixes

* fixes for broken links

* removing sample project repo option until ready

* Adding C++ compiler to the prereqs section

* removed un-needed parts of vcpkg.json example
2024-02-14 15:01:33 -08:00
Anton Kolesnyk 73399d7325
Change samples to use `DefaultAzureCredential` (#5183)
* Change samples to use `DefaultAzureCredential`

* Missed instance

* Oaep

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-11-29 16:07:40 +00:00
Anton Kolesnyk 2da2d0d8cc
Remove some usages of internal APIs in samples (#5186)
* Remove some usages of internal APIs in samples

* std::cerr => std::cout

* Two errors would actually go to stderr

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-11-28 01:15:14 -08:00
Anton Kolesnyk 50c18516df
Ensure CMakeLists don't miss any files (#5065)
* Ensure CMakeLists don't miss any files

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-10-26 18:15:03 -07:00
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
Larry Osterman b303a70eaa
Stop disabling security warnings in get_env.hpp; Fixed all incorrect … (#4655)
* Disable deprecation warnings in cmakelists.txt to avoid introducing new concepts; removed unnecessary uses of get_env.hpp

* Removed use of GetEnvHelper from AMQP samples

* Removed special case for get_env.hpp
2023-06-01 12:50:45 -07:00
Larry Osterman fb240a4b25
Define a standardized header ordering for Azure SDK for C++ (#4632)
* Standardized header ordering for C++ repo

* Reordered categories to move private headers above public headers; added space between categories to enable future flexibility
2023-05-26 14:32:45 -07:00
Rick Winter 59a44ba3d8
Add clear contributing section
* Update README.md
2023-05-15 13:09:42 -07:00
Anton Kolesnyk a70be339e7
Audit string comparisons (#4197)
* Audit string comparisons

* Mac fix

* !isxdigit()

* Rewrite condition + comment

* <3

* Clang-format

* 255

* Allow uppercase

* stoi() radix

* ShouldEncode()

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-01-03 11:16:54 -08:00
Anton Kolesnyk 6aac5aba17
Make sample service an object library (#3728)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2022-06-08 16:25:45 -07:00
Victor Vazquez cad69e1a8c
Remove samples with docker.io (#3621)
* remove samples using docker.io

* removing docker files

* remove project
2022-06-02 19:49:32 +00:00
Larry Osterman 0fd02674fe
Moved attestation factory back to static method on attestation class … (#3682)
* Moved attestation factory back to static method on attestation class and return a concrete type not a pointer

* Fixed factory in readme file
2022-06-01 18:33:59 +00:00
George Arama 855f000f63
Vcpkg sample (#3670)
* one commit to rule them all

* main merge

* error

* all smoke

* typo

* 120 minutes

* timeout param missing on job

* actual url

* Update samples/integration/vcpkg-all-smoke/src/main.cpp

Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>

* actual creds

Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>
2022-05-27 12:17:43 -07:00
Larry Osterman 745091d01c
Split out attestation client factory into separate class (#3654)
* Split out attestation client factory into separate class

* Updated readme; clang-format

* Final set of API review changes

* Replaced () constructors with {} constructors
2022-05-23 15:54:57 -07:00
Anton Kolesnyk 80cf3d09fd
Update all-inclusive headers, and CMakeFiles for including all headers (#3640) 2022-05-17 20:45:46 -07:00
Anton Kolesnyk 7c34ab088e
Fix identity samples running in CI (#3632) 2022-05-10 21:08:40 -07:00
Larry Osterman a2d975c7d4
API Review Feedback for Attestation SDK (#3543)
* API Review Feedback for Attestation SDK

* Updated changelog to reflect API Review updates
2022-05-03 13:46:35 -07:00
George Arama b5ee71b676
Add attestation clients (#3464)
* initial setup

* smoke sample

* cleanup

* typo

* typo 2

* typo 3

* daniel's feedback

* add sotrage sdks

* added storage

* more test

* cleanup

* remove attestetion from samples for the moment

* PR comments

* typo

* remove finds

* vcpkg maybe

* REQUIRED

* try try again

* noidea

* fff

* Adding attestation client

* test done

* PR comments

* return
2022-03-23 12:50:02 -07:00
Larry Osterman af7281ef1a
Updated and add samples for Attestation service. (#3448)
* Moved samples around to meet new recommendations; added a couple of additional tests.
* Reworked attestation to include RetrieveAttestationValidationCollateral
* Attestation sample readme updates
* TPM doesn't need to retrieve response validation collateral
* Added cautionary warning about the dangers of overriding the TearDown method from inside a test case
* Added attestation team members to codeowners for attestation SDK
* Remove CODEOWNERS from cspell checks
* Don't hold a lock across retrieving the signers over the network
* Updated snippets in readme; clang-format
2022-03-22 14:29:03 -07:00
Victor Vazquez cbab8bbeb5
fix for linux build (#3462) 2022-03-22 17:57:32 +00:00
George Arama 183db457fd
Smoketest (#3449)
* initial setup

* smoke sample

* cleanup

* typo

* typo 2

* typo 3

* daniel's feedback

* add sotrage sdks

* added storage

* more test

* cleanup

* remove attestetion from samples for the moment

* PR comments

* typo

* remove finds

* vcpkg maybe

* REQUIRED

* try try again

* noidea

* fff
2022-03-21 19:49:29 -07:00
Victor Vazquez feaaf0b414
Update release mode windows + samples (#3451)
* changes

* vs generator

* use macro

* release and samples

* add target to build smoke test

* revert

* reuse macro for samples

* extra legs for samples only

* storage connection string

* format

* order and macro

* update

* samples

* missing
2022-03-22 01:39:39 +00:00
George Arama c4678c9a10
Add smoketest MVP (#3440)
* initial setup

* smoke sample

* cleanup

* typo

* typo 2

* typo 3

* daniel's feedback
2022-03-17 12:20:15 -07:00
Anton Kolesnyk 2aae6be7a3
Encapsulate getenv(), and make it work on UWP (#3275)
It all started with UWP. The [docs](https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=msvc-170) say: "`Environment variables are not available to UWP apps.`". And it truly won't work, I tried: linker error, the function is simply not present.

So, for a year or so, we were `ifdef`ing everything enivoronment-related: console logger, environment credential, managed identity credential.

And then just recently we wanted to enable our CI for UWP, including tests and samples. And it required to do more ifdefs (in vcpkg, we don't build samples or tests, so that problem did not exist).

It just became more messy. Especially in samples - you can see how we would disable warning with `#pragma warning(disable : 4996)` or defining `_CRT_SECURE_NO_WARNINGS` already, but now came UWP, so we would have to add comment that `getenv()` is not available and make the sample compilation to either fail with clear message, or throw an exception. Plus we would have to detect that we are being compiled on UWP, which also adds visual clutter for reader. You can see how such an irrelevant (for a sample) thing as `getenv` was consuming more and more lines of sample code and reader's attention.

But then! I read docs on more APIs for UWP. And I noticed that on .NET you can read environment variables. So I went and checked Win32 API docs for [GetEnvironmentVariable()](https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getenvironmentvariable) - it says: "`Minimum supported client: ... UWP apps`".

**GetEnvironmentVariable() works on UWP!**
And so does `SetEnvironmentVariable()` (our tests use it, which means we can make all of them work and execute for UWP).

That's good news, but now it would probably be more code: it usually takes more lines to invoke WinAPI, it is no more an one-liner to call `getenv()/setenv()`. So, I encapsulated that into `Azure::Core::_internal::Environment::GetVariable()` and `SetVariable()`. You can see how much less ifdefs is in our code now. Not to mention it works on UWP!

Per team request, that API is SDK-internal. Samples use their own mini-helper project, `get-env-helper` that makes is so that `getenv()` works naturally on Linux and macOS, compiles without warnings and works on Win32, and compiles and works on UWP (using `GetEnvironmentStringsA()`)

If it was for me, I would just make `Azure::Core::Environment::GetVariable()` public and simplify even further, I think it would be beneficial for sample readers (you can see that extra `get-env-helper` stuff adds just a little more visual clutter, compared to nothing). But I can see reasons against that, why team did not want to do it.
2022-01-29 08:22:33 +00:00
George Arama 10a46b3132
fixup sample , add to build (#2808) 2021-09-01 18:04:20 -07:00
Wes Haggard 015c34a029
Update links from master to main (#2488)
* Update links from master to main

* Upate other references from master to main
2021-06-24 22:27:14 -07:00
Ahson Khan 479134595b
Consolidate the use of std::size_t and always use size_t instead, since it is a "primitive" type. (#2415)
* Consolidate the use of std::size_t and always use size_t instead, since
it is a type.

* Fix clang formatting.
2021-06-09 11:09:54 -07:00
Anton Kolesnyk efe4772acb
Update upper/lower/other casing (#2267)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2021-05-14 12:54:16 -07:00
Victor Vazquez 1f5bfb6984
Vcpkg sample (#2161)
* extra test

* sample

* typo

* Adding storage sample
2021-05-07 21:22:42 +00:00
Ahson Khan 8095d85e67
Simplify the public surface design of Response<T> for usability. (#1974)
* Simplify the design of Response<T> for usability.

* Revert changes to operation<T> to keep the changes single purpose.

* Update many of the response<T> call sites based on API changes.

* Update all remaining callsites and fix clang formatting.

* Update Response<T> documentation.

* Fix clang formatting.

* Remove status code from the Response<T> public surface area.

* Update the changelog.

* Fix up CL wording and remove commented-out change to operation<T>.

* Fixed test by actually calling a method.

* Fix up key vault test by not taking ownership of raw response.

* Fix call to get status code in test.

* Add new line at end of keyvualt live test file.

* Make a local copy within keyvault pipeline to avoid compilers re-ordering things.

* Make the fixes to the recent keyvault changes.

* Fix key vault pipeline to address ImportKey test failure
2021-04-01 00:50:04 +00:00
Rick Winter 50efbdb4c0
Add holder for registry handle to ensure cleanup of native resources. (#1711)
Add a holder for the registry key to ensure it is always cleaned up when it goes out of scope.
Exceptions should be caught as const.
2021-02-22 17:48:28 +00:00
Victor Vazquez 1aaf1f22df
Sample for fetchContent (#1392)
* Sample for fetchContent
2021-01-22 16:10:44 -08:00
Sima Zhu 8fed524b96
Replaced relative link with absolute links and remove locale (#668) 2020-09-17 22:28:36 -07:00
KarishmaGhiya 3060f7341c
clean up links and add link verification (#410) 2020-08-07 11:55:11 -07:00
Rick Winter 603c9d9694
Add the toplevel Sample readme (#29) 2020-03-16 10:20:15 -07:00