AuthenticationInfoParser.h (1021B)
1 // Copyright (c) Microsoft Corporation. 2 // Licensed under the MIT License. 3 #pragma once 4 #include <cpprest/json.h> 5 #include <winget/Authentication.h> 6 #include <winget/ManifestCommon.h> 7 8 namespace AppInstaller::Repository::Rest::Schema 9 { 10 enum class ParseAuthenticationInfoType 11 { 12 Source, 13 Installer, 14 }; 15 16 // Parses AuthenticationInfo from json object. 17 // This could be used for installer level parsing as well in manifest deserializer (currently not supported, manifestVersion not used). 18 // The authentication info json looks like below: 19 // "Authentication": { 20 // "AuthenticationType": "microsoftEntraId", 21 // "MicrosoftEntraIdAuthenticationInfo" : { 22 // "Resource": "GUID", 23 // "Scope" : "test" 24 // } 25 // } 26 Authentication::AuthenticationInfo ParseAuthenticationInfo(const web::json::value& dataObject, ParseAuthenticationInfoType parseType, std::optional<Manifest::ManifestVer> manifestVersion = {}); 27 }