Adding scope overrride in xboxservices.config (#251)
This commit is contained in:
Родитель
0d14b5a6a1
Коммит
be92ffa480
|
@ -538,7 +538,8 @@ title_callable_ui::_Get_gaming_privilege_scope_policy(
|
|||
localConfig->environment_prefix(),
|
||||
localConfig->environment(),
|
||||
localConfig->use_first_party_token(),
|
||||
localConfig->is_creators_title()
|
||||
localConfig->is_creators_title(),
|
||||
localConfig->scope()
|
||||
);
|
||||
|
||||
scope = ref new Platform::String(authConfig.rps_ticket_service().c_str());
|
||||
|
|
|
@ -173,6 +173,12 @@ bool local_config::is_creators_title()
|
|||
return get_bool_from_config(_T("XboxLiveCreatorsTitle"), false, false);
|
||||
}
|
||||
|
||||
string_t local_config::scope()
|
||||
{
|
||||
string_t defaultScope = is_creators_title() ? _T("xbl.signin xbl.friends") : _T("xboxlive.signin");
|
||||
return get_value_from_config(_T("Scope"), false, defaultScope);
|
||||
}
|
||||
|
||||
|
||||
#if XSAPI_I
|
||||
string_t local_config::apns_environment()
|
||||
|
|
|
@ -41,6 +41,7 @@ public:
|
|||
virtual string_t client_secret();
|
||||
virtual bool use_first_party_token();
|
||||
virtual bool is_creators_title();
|
||||
virtual string_t scope();
|
||||
|
||||
virtual string_t get_value_from_local_storage(_In_ const string_t& name);
|
||||
virtual xbox_live_result<void> write_value_to_local_storage(_In_ const string_t& name, _In_ const string_t& value);
|
||||
|
|
|
@ -42,7 +42,8 @@ auth_config::auth_config(
|
|||
_In_ string_t environmentPrefix,
|
||||
_In_ string_t environment,
|
||||
_In_ bool useCompactTicket,
|
||||
_In_ bool isCreatorsTitle) :
|
||||
_In_ bool isCreatorsTitle,
|
||||
_In_ string_t scope) :
|
||||
m_useCompactTicket(useCompactTicket),
|
||||
m_sandbox(std::move(sandbox)),
|
||||
m_detailError(0),
|
||||
|
@ -58,7 +59,7 @@ auth_config::auth_config(
|
|||
m_serviceTokenEndpoint = get_endpoint_path(_T("service.auth"), environmentPrefix, environment);
|
||||
m_xTokenEndpoint = get_endpoint_path(_T("xsts.auth"), environmentPrefix, environment);
|
||||
m_userTokenSiteName = get_endpoint_path(_T("user.auth"), _T(""), environment, false);
|
||||
m_rpsTicketService = isCreatorsTitle ? _T("xbl.signin xbl.friends") : (useCompactTicket ? m_userTokenSiteName : _T("xboxlive.signin"));
|
||||
m_rpsTicketService = isCreatorsTitle ? scope : (useCompactTicket ? m_userTokenSiteName : scope);
|
||||
m_xtokenComposition = { token_identity_type::u_token, token_identity_type::d_token, token_identity_type::t_token };
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,8 @@ public:
|
|||
_In_ string_t environmentPrefix,
|
||||
_In_ string_t environment,
|
||||
_In_ bool useCompactTicket,
|
||||
_In_ bool isCreatorsTitle
|
||||
_In_ bool isCreatorsTitle,
|
||||
_In_ string_t scope
|
||||
);
|
||||
|
||||
const string_t& xbox_live_endpoint() const;
|
||||
|
|
|
@ -44,7 +44,8 @@ user_impl::user_impl(
|
|||
m_localConfig->environment_prefix(),
|
||||
m_localConfig->environment(),
|
||||
m_localConfig->use_first_party_token(),
|
||||
m_localConfig->is_creators_title()
|
||||
m_localConfig->is_creators_title(),
|
||||
m_localConfig->scope()
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ MockUser::internal_get_token_and_signature(
|
|||
|
||||
std::shared_ptr<xbox::services::system::auth_config> MockUser::auth_config()
|
||||
{
|
||||
return std::make_shared<xbox::services::system::auth_config>(_T("MockSandbox"), _T("MockPrefix-"), _T("MockEnv"), false, false);
|
||||
return std::make_shared<xbox::services::system::auth_config>(_T("MockSandbox"), _T("MockPrefix-"), _T("MockEnv"), false, false, _T("MockScope"));
|
||||
}
|
||||
|
||||
std::shared_ptr<xbox::services::xbox_live_context_settings> MockUser::xbox_live_context_settings()
|
||||
|
|
Загрузка…
Ссылка в новой задаче