13 #include "AuthenticationResult.h"
14 #include "ClientKey.h"
15 #include "CallState.h"
16 #include "TokenCacheNotificationArgs.h"
17 #include "TokenCacheKey.h"
18 #include "TokenCacheItem.h"
20 #include "rmsauthExport.h"
26 static const String Tag(){
static const String tag =
"TokenCache";
return tag;}
28 const int SchemaVersion_ = 2;
29 const String LocalSettingsContainerName_ =
"ActiveDirectoryAuthenticationLibrary";
30 HashMap<TokenCacheKey, AuthenticationResultPtr> tokenCacheDictionary_;
32 const int64_t expirationMarginInSeconds_ = 300;
37 bool hasStateChanged()
const {
return hasStateChanged_; }
38 void hasStateChanged(
const bool val) { hasStateChanged_ = val; }
41 ByteArray serialize();
42 void deserialize(
const ByteArray& state);
43 virtual List<TokenCacheItemPtr> readItems();
44 virtual void deleteItem(TokenCacheItemPtr item);
51 AuthenticationResultPtr loadFromCache(
const String& authority,
const String& resource,
const String& clientId, TokenSubjectType subjectType,
const String& uniqueId, CallStatePtr callState);
52 void storeToCache(AuthenticationResultPtr result,
const String& authority,
const String& resource,
const String& clientId, TokenSubjectType subjectType, CallStatePtr callState);
53 void updateCachedMrrtRefreshTokens(AuthenticationResultPtr result,
const String& authority,
const String& clientId, TokenSubjectType subjectType);
54 TokenCacheItemPtr loadSingleItemFromCache(
const String& authority,
const String& resource,
const String& clientId, TokenSubjectType subjectType,
const String& uniqueId, CallStatePtr callState);
55 List<TokenCacheItemPtr> queryCache(
const String& authority,
const String& clientId, TokenSubjectType subjectType,
const String& uniqueId);
56 virtual const String getCacheName()
const {
return TokenCache::Tag();}
60 volatile bool hasStateChanged_ =
false;
63 using TokenCachePtr = ptr<TokenCache>;
67 #endif // TOKENCACHE_H
Definition: TokenCache.h:24
Definition: TokenCacheNotificationArgs.h:18
Definition: AcquireTokenForClientHandler.h:14