28 #ifndef CPL_SWIFT_INCLUDED_H
29 #define CPL_SWIFT_INCLUDED_H
35 #include <curl/curl.h>
41 class VSISwiftHandleHelper final :
public IVSIS3LikeHandleHelper
49 static bool GetConfiguration(
const std::string &osPathForOption,
53 static bool GetCached(
const std::string &osPathForOption,
54 const char *pszURLKey,
const char *pszUserKey,
55 const char *pszPasswordKey,
CPLString &osStorageURL,
62 void RebuildURL()
override;
65 static bool CheckCredentialsV1(
const std::string &osPathForOption);
66 static bool AuthV1(
const std::string &osPathForOption,
70 static bool CheckCredentialsV3(
const std::string &osPathForOption,
72 static bool AuthV3(
const std::string &osPathForOption,
76 CreateAuthV3RequestObject(
const std::string &osPathForOption,
78 static bool GetAuthV3StorageURL(
const std::string &osPathForOption,
83 VSISwiftHandleHelper(
const CPLString &osStorageURL,
87 ~VSISwiftHandleHelper();
89 bool Authenticate(
const std::string &osPathForOption);
91 static VSISwiftHandleHelper *BuildFromURI(
const char *pszURI,
92 const char *pszFSPrefix);
95 GetCurlHeaders(
const CPLString &osVerbosVerb,
96 const struct curl_slist *psExistingHeaders,
97 const void *pabyDataContent =
nullptr,
98 size_t nBytesContent = 0)
const override;
105 static void CleanMutex();
106 static void ClearCache();