9 #ifndef AUTHENTICATIONRESULT_H
10 #define AUTHENTICATIONRESULT_H
14 #include "rmsauthExport.h"
18 class AuthenticationResult;
19 using AuthenticationResultPtr = ptr<AuthenticationResult>;
23 static const String& Tag() {
static const String tag=
"AuthenticationResult";
return tag;}
25 const String oAuth2AuthorizationHeader_ =
"Bearer ";
27 String accessTokenType_;
31 DateTimeOffset expiresOn_;
33 UserInfoPtr userInfo_;
35 bool isMultipleResourceRefreshToken_;
38 AuthenticationResult(
const String& accessTokenType,
const String& accessToken,
const String& refreshToken, DateTimeOffset expiresOn);
40 const String& accessTokenType()
const {
return accessTokenType_; }
42 const String& accessToken()
const {
return accessToken_; }
43 void accessToken(
const String& val){ accessToken_ = val; }
45 const String& resource()
const {
return resource_; }
46 void resource(
const String& val){ resource_ = val; }
48 const String& refreshToken()
const {
return refreshToken_; }
49 void refreshToken(
const String& val){ refreshToken_ = val; }
51 DateTimeOffset expiresOn()
const {
return expiresOn_; }
53 const String& tenantId()
const {
return tenantId_; }
55 const UserInfoPtr userInfo()
const {
return userInfo_; }
57 const String& idToken()
const {
return idToken_; }
59 bool isMultipleResourceRefreshToken()
const {
return isMultipleResourceRefreshToken_; }
60 void isMultipleResourceRefreshToken(
const bool val) { isMultipleResourceRefreshToken_ = val; }
63 String createAuthorizationHeader();
64 static AuthenticationResultPtr deserialize(
const String& );
67 void updateTenantAndUserInfo(
const String& tenantId,
const String& idToken, UserInfoPtr userInfo);
74 static struct _JsonNames {
75 const String accessTokenType =
"accessTokenType";
76 const String accessToken =
"accessToken";
77 const String resource =
"resource";
78 const String refreshToken =
"refreshToken";
79 const String expiresOn =
"expiresOn";
80 const String tenantId =
"tenantId_";
81 const String userInfo =
"userInfo";
82 const String idToken =
"idToken";
83 const String isMultipleResourceRefreshToken =
"isMultipleResourceRefreshToken";
90 #endif // AUTHENTICATIONRESULT_H
Definition: AuthenticationResult.h:21
Definition: OAuth2Response.h:20
Definition: AcquireTokenForClientHandler.h:14