9 #ifndef TOKENCACHEITEM_H
10 #define TOKENCACHEITEM_H
13 #include "AuthenticationResult.h"
14 #include "TokenCacheKey.h"
21 AuthenticationResultPtr resultPtr_;
26 const TokenCacheKey& tokenCacheKey()
const {
return tokenCacheKey_;}
28 const AuthenticationResultPtr authenticationResult()
const {
return resultPtr_; }
29 AuthenticationResultPtr authenticationResult() {
return resultPtr_;}
31 const String& authority()
const {
return tokenCacheKey_.authority(); }
32 const String& clientId()
const {
return tokenCacheKey_.clientId(); }
33 DateTimeOffset expiresOn()
const {
return resultPtr_->expiresOn(); }
34 const String familyName()
const {
return resultPtr_->userInfo() !=
nullptr ? resultPtr_->userInfo()->familyName():
""; }
35 const String givenName()
const {
return resultPtr_->userInfo() !=
nullptr ? resultPtr_->userInfo()->givenName():
""; }
36 const String identityProvider()
const {
return resultPtr_->userInfo() !=
nullptr ? resultPtr_->userInfo()->identityProvider():
""; }
37 bool isMultipleResourceRefreshToken()
const {
return resultPtr_->isMultipleResourceRefreshToken(); }
38 const String& resource()
const {
return tokenCacheKey_.resource(); }
39 const String& tenantId()
const {
return resultPtr_->tenantId(); }
40 const String& uniqueId()
const {
return tokenCacheKey_.uniqueId(); }
42 const String& accessToken()
const {
return resultPtr_->accessToken(); }
43 const String& refreshToken()
const {
return resultPtr_->refreshToken(); }
44 void refreshToken(
const String& val) { resultPtr_->refreshToken(val); }
45 const String& idToken()
const {
return resultPtr_->idToken(); }
46 TokenSubjectType tokenSubjectType()
const {
return tokenCacheKey_.tokenSubjectType(); }
49 using TokenCacheItemPtr = ptr<TokenCacheItem>;
53 #endif // TOKENCACHEITEM_H
Definition: TokenCacheItem.h:18
Definition: AcquireTokenForClientHandler.h:14
Definition: TokenCacheKey.h:24