// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "zen.h" #include "zenutil/authutils.h" namespace zen { struct HttpClientSettings; class AuthMgr; struct AuthCommandLineOptions { // Direct access token (may expire) std::string m_AccessToken; std::string m_AccessTokenEnv; std::filesystem::path m_AccessTokenPath; // Auth manager token encryption std::string m_EncryptionKey; // 256 bit AES encryption key std::string m_EncryptionIV; // 128 bit AES initialization vector // OpenId acccess token std::string m_OpenIdProviderName; std::string m_OpenIdProviderUrl; std::string m_OpenIdClientId; std::string m_OpenIdRefreshToken; // OAuth acccess token std::string m_OAuthUrl; std::string m_OAuthClientId; std::string m_OAuthClientSecret; std::string m_OidcTokenAuthExecutablePath; bool m_OidcTokenUnattended = false; void AddOptions(cxxopts::Options& Ops); void ParseOptions(cxxopts::Options& Ops, const std::filesystem::path& SystemRootDir, HttpClientSettings& InOutClientSettings, std::string_view HostUrl, std::unique_ptr& OutAuthMgr, bool Quiet, bool Hidden, bool Verbose); }; std::string ReadAccessTokenFromJsonFile(const std::filesystem::path& Path); std::string_view GetDefaultAccessTokenEnvVariableName(); } // namespace zen