File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,24 @@ class SimpleCurlGet {
112112
113113} // namespace internal
114114
115+ /* *
116+ * @brief Determines the location of the SciTokens key cache file.
117+ *
118+ * This function checks environment variables and configuration settings to find
119+ * the appropriate directory for the key cache file. It prioritizes the following:
120+ * 1. SCITOKENS_KEYCACHE_FILE environment variable (direct file path).
121+ * 2. Configured cache directory via Configuration::get_cache_home().
122+ * 3. XDG_CACHE_HOME environment variable.
123+ * 4. Default to $HOME/.cache if none of the above are set.
124+ *
125+ * The function ensures the cache directory exists, creates it if necessary,
126+ * initializes the SQLite database if needed, and returns the full path to the
127+ * cache file. Returns an empty string on failure.
128+ *
129+ * @return std::string Full path to the key cache file, or empty string on error.
130+ */
131+ std::string get_cache_file ();
132+
115133class UnsupportedKeyException : public std ::runtime_error {
116134 public:
117135 explicit UnsupportedKeyException (const std::string &msg)
You can’t perform that action at this time.
0 commit comments