You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: msal/token_cache.py
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -363,11 +363,14 @@ class SerializableTokenCache(TokenCache):
363
363
364
364
This class does NOT actually persist the cache on disk/db/etc..
365
365
Depending on your need,
366
-
the following simple recipe for file-based persistence may be sufficient::
366
+
the following simple recipe for file-based, unencrypted persistence may be sufficient::
367
367
368
368
import os, atexit, msal
369
369
cache_filename = os.path.join( # Persist cache into this file
370
-
os.getenv("XDG_RUNTIME_DIR", ""), # Automatically wipe out the cache from Linux when user's ssh session ends. See also https://github.com/AzureAD/microsoft-authentication-library-for-python/issues/690
370
+
os.getenv(
371
+
# Automatically wipe out the cache from Linux when user's ssh session ends.
372
+
# See also https://github.com/AzureAD/microsoft-authentication-library-for-python/issues/690
373
+
"XDG_RUNTIME_DIR", ""),
371
374
"my_cache.bin")
372
375
cache = msal.SerializableTokenCache()
373
376
if os.path.exists(cache_filename):
@@ -380,6 +383,10 @@ class SerializableTokenCache(TokenCache):
0 commit comments