com.xd.sdk.account 0.0.1 → 0.0.10-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/Plugins/Android/libs/XDGAccount_7.0.0.aar +0 -0
  2. package/{Mobile/Plugins/Android/com/xd/account/bridge/XDGAccountBridge.java.meta → Plugins/Android/libs/XDGAccount_7.0.0.aar.meta} +2 -2
  3. package/Plugins/Android/libs/XDGSupport_7.0.0.aar +0 -0
  4. package/Plugins/Android/libs/{XDGAccount_6.21.1.aar.meta → XDGSupport_7.0.0.aar.meta} +2 -2
  5. package/Plugins/Android/libs.meta +1 -1
  6. package/Plugins/Android.meta +1 -1
  7. package/Plugins/iOS/XDAccountSDK.framework/Headers/TDSGlobalThirdPartyLoginHelper.h +4 -9
  8. package/Plugins/iOS/XDAccountSDK.framework/Headers/TDSGlobalThirdPartyLoginHelper.h.meta +1 -1
  9. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDAccountSDK-Swift.h +329 -0
  10. package/Plugins/iOS/XDAccountSDK.framework/Headers/{TDSGlobalThirdPartyLoginManager.h.meta → XDAccountSDK-Swift.h.meta} +1 -1
  11. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDAccountSDK.h +2 -2
  12. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDAccountSDK.h.meta +1 -1
  13. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccount.h +36 -44
  14. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccount.h.meta +1 -1
  15. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccountDefines.h +43 -0
  16. package/Plugins/iOS/XDAccountSDK.framework/Headers/{XDGPhoneAuthManager.h.meta → XDGAccountDefines.h.meta} +1 -1
  17. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccountVersion.h +3 -2
  18. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccountVersion.h.meta +1 -1
  19. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGLogger+Account.h +3 -0
  20. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGLogger+Account.h.meta +1 -1
  21. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGLoginEntriesConfig.h.meta +1 -1
  22. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGLoginService.h.meta +1 -1
  23. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGTapLoginPermissionDialog.h.meta +1 -1
  24. package/Plugins/iOS/XDAccountSDK.framework/Headers.meta +1 -1
  25. package/Plugins/iOS/XDAccountSDK.framework/Info.plist +0 -0
  26. package/Plugins/iOS/XDAccountSDK.framework/Info.plist.meta +1 -1
  27. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  28. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo.meta +7 -0
  29. package/{Mobile/Http.meta → Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/Project.meta} +1 -1
  30. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.abi.json +9 -0
  31. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.abi.json.meta +7 -0
  32. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  33. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.swiftdoc.meta +7 -0
  34. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
  35. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.swiftmodule.meta +7 -0
  36. package/{Mobile/Editor.meta → Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule.meta} +1 -1
  37. package/Plugins/iOS/XDAccountSDK.framework/Modules/module.modulemap.meta +1 -1
  38. package/Plugins/iOS/XDAccountSDK.framework/Modules.meta +1 -1
  39. package/Plugins/iOS/XDAccountSDK.framework/XDAccountSDK +0 -0
  40. package/Plugins/iOS/XDAccountSDK.framework/XDAccountSDK.meta +1 -1
  41. package/Plugins/iOS/XDAccountSDK.framework.meta +57 -4
  42. package/Plugins/iOS.meta +1 -1
  43. package/Plugins.meta +1 -1
  44. package/Runtime/Internal/IXDGAccount.Extended.cs +11 -0
  45. package/{Mobile/Http/XDGAccountHttpConfigMobile.cs.meta → Runtime/Internal/IXDGAccount.Extended.cs.meta} +1 -1
  46. package/Runtime/Internal/Mobile/AccountFeaturesImpl.cs +341 -0
  47. package/{Mobile/XDGAccountMobile.cs.meta → Runtime/Internal/Mobile/AccountFeaturesImpl.cs.meta} +1 -1
  48. package/Runtime/Internal/Mobile/Http/LoginSyncResponse.cs +14 -0
  49. package/Runtime/Internal/Mobile/Http/LoginSyncResponse.cs.meta +3 -0
  50. package/Runtime/Internal/Mobile/Http/MacAuthenticationInterceptor.cs +37 -0
  51. package/Runtime/Internal/Mobile/Http/MacAuthenticationInterceptor.cs.meta +3 -0
  52. package/Runtime/Internal/Mobile/Http.meta +3 -0
  53. package/{Mobile.meta → Runtime/Internal/Mobile.meta} +1 -1
  54. package/Runtime/Internal/Standalone/AccessToken/AccessTokenModule.cs +168 -0
  55. package/{Mobile/Editor/XDAccountMobileProcessBuild.cs.meta → Runtime/Internal/Standalone/AccessToken/AccessTokenModule.cs.meta} +1 -1
  56. package/Runtime/Internal/Standalone/AccessToken.meta +8 -0
  57. package/Runtime/Internal/Standalone/AccountCell.cs +143 -0
  58. package/{Mobile/XDGAccountMobileImpl.cs.meta → Runtime/Internal/Standalone/AccountCell.cs.meta} +1 -1
  59. package/Runtime/Internal/Standalone/AccountFeaturesImpl.cs +452 -0
  60. package/Runtime/Internal/Standalone/AccountFeaturesImpl.cs.meta +11 -0
  61. package/Runtime/Internal/Standalone/Auth/AppleAuth.cs +27 -0
  62. package/Runtime/Internal/Standalone/Auth/AppleAuth.cs.meta +11 -0
  63. package/Runtime/Internal/Standalone/Auth/FacebookAuth.cs +27 -0
  64. package/Runtime/Internal/Standalone/Auth/FacebookAuth.cs.meta +11 -0
  65. package/Runtime/Internal/Standalone/Auth/GoogleAuth.cs +27 -0
  66. package/Runtime/Internal/Standalone/Auth/GoogleAuth.cs.meta +11 -0
  67. package/Runtime/Internal/Standalone/Auth/GuestAuth.cs +22 -0
  68. package/Runtime/Internal/Standalone/Auth/GuestAuth.cs.meta +11 -0
  69. package/Runtime/Internal/Standalone/Auth/PhoneAuth.cs +43 -0
  70. package/Runtime/Internal/Standalone/Auth/PhoneAuth.cs.meta +11 -0
  71. package/Runtime/Internal/Standalone/Auth/SteamAuth.cs +90 -0
  72. package/Runtime/Internal/Standalone/Auth/SteamAuth.cs.meta +11 -0
  73. package/Runtime/Internal/Standalone/Auth/TapAuth.cs +72 -0
  74. package/Runtime/Internal/Standalone/Auth/TapAuth.cs.meta +11 -0
  75. package/Runtime/Internal/Standalone/Auth/WebAuth.cs +144 -0
  76. package/Runtime/Internal/Standalone/Auth/WebAuth.cs.meta +11 -0
  77. package/Runtime/Internal/Standalone/Auth.meta +8 -0
  78. package/Runtime/Internal/Standalone/LoginModule/Email/EmailModule.cs +374 -0
  79. package/Runtime/Internal/Standalone/LoginModule/Email/EmailModule.cs.meta +11 -0
  80. package/Runtime/Internal/Standalone/LoginModule/Email.meta +8 -0
  81. package/Runtime/Internal/Standalone/LoginModule/Phone/PhoneModule.cs +245 -0
  82. package/Runtime/Internal/Standalone/LoginModule/Phone/PhoneModule.cs.meta +11 -0
  83. package/Runtime/Internal/Standalone/LoginModule/Phone/PhoneModuleIO.cs +392 -0
  84. package/Runtime/Internal/Standalone/LoginModule/Phone/PhoneModuleIO.cs.meta +11 -0
  85. package/Runtime/Internal/Standalone/LoginModule/Phone.meta +8 -0
  86. package/Runtime/Internal/Standalone/LoginModule.meta +8 -0
  87. package/Runtime/Internal/Standalone/SupportModule/SupportModule.cs +200 -0
  88. package/Runtime/Internal/Standalone/SupportModule/SupportModule.cs.meta +3 -0
  89. package/Runtime/Internal/Standalone/SupportModule/SupportResponse.cs +27 -0
  90. package/Runtime/Internal/Standalone/SupportModule/SupportResponse.cs.meta +3 -0
  91. package/Runtime/Internal/Standalone/SupportModule.meta +3 -0
  92. package/Runtime/Internal/Standalone/Track/AliyunTrack.Login.cs +479 -0
  93. package/Runtime/Internal/Standalone/Track/AliyunTrack.Login.cs.meta +11 -0
  94. package/Runtime/Internal/Standalone/Track.meta +8 -0
  95. package/Runtime/Internal/Standalone/UI/CodeUnbindAlert.cs +156 -0
  96. package/Runtime/Internal/Standalone/UI/CodeUnbindAlert.cs.meta +11 -0
  97. package/Runtime/Internal/Standalone/UI/Email/EmailAlert.cs +295 -0
  98. package/Runtime/Internal/Standalone/UI/Email/EmailAlert.cs.meta +11 -0
  99. package/Runtime/Internal/Standalone/UI/Email.meta +8 -0
  100. package/Runtime/Internal/Standalone/UI/PhoneIO/AreaCodeCell.cs +46 -0
  101. package/Runtime/Internal/Standalone/UI/PhoneIO/AreaCodeCell.cs.meta +11 -0
  102. package/Runtime/Internal/Standalone/UI/PhoneIO/PhoneAlertIO.cs +522 -0
  103. package/Runtime/Internal/Standalone/UI/PhoneIO/PhoneAlertIO.cs.meta +11 -0
  104. package/Runtime/Internal/Standalone/UI/PhoneIO.meta +8 -0
  105. package/Runtime/Internal/Standalone/UI/PhoneVerification/PhoneNumberInputAlert.cs +84 -0
  106. package/Runtime/Internal/Standalone/UI/PhoneVerification/PhoneNumberInputAlert.cs.meta +11 -0
  107. package/Runtime/Internal/Standalone/UI/PhoneVerification/RiskControlAlert.cs +190 -0
  108. package/Runtime/Internal/Standalone/UI/PhoneVerification/RiskControlAlert.cs.meta +11 -0
  109. package/Runtime/Internal/Standalone/UI/PhoneVerification/VerifyCodeInputAlert.cs +164 -0
  110. package/Runtime/Internal/Standalone/UI/PhoneVerification/VerifyCodeInputAlert.cs.meta +11 -0
  111. package/Runtime/Internal/Standalone/UI/PhoneVerification.meta +8 -0
  112. package/Runtime/Internal/Standalone/UI.meta +8 -0
  113. package/Runtime/Internal/Standalone/UserCenterAlert.cs +405 -0
  114. package/Runtime/Internal/Standalone/UserCenterAlert.cs.meta +11 -0
  115. package/Runtime/Internal/Standalone/UserModule.cs +597 -0
  116. package/Runtime/Internal/Standalone/UserModule.cs.meta +11 -0
  117. package/Runtime/Internal/Standalone/WebFunction/AccessTokenWebFunction.cs +47 -0
  118. package/Runtime/Internal/Standalone/WebFunction/AccessTokenWebFunction.cs.meta +3 -0
  119. package/Runtime/Internal/Standalone/WebFunction.meta +3 -0
  120. package/{Mobile/Plugins.meta → Runtime/Internal/Standalone.meta} +1 -1
  121. package/Runtime/Internal/XDGAccountEventHandler.cs +21 -0
  122. package/Runtime/Internal/XDGAccountEventHandler.cs.meta +3 -0
  123. package/Runtime/Internal/XDGAccountInternal.cs +87 -0
  124. package/Runtime/Internal/XDGAccountInternal.cs.meta +11 -0
  125. package/Runtime/Internal.meta +1 -1
  126. package/Runtime/Public/XDGAccount.Deprecated.cs +37 -0
  127. package/Runtime/Public/XDGAccount.Deprecated.cs.meta +11 -0
  128. package/Runtime/Public/XDGAccount.cs +107 -0
  129. package/Runtime/Public/XDGAccount.cs.meta +11 -0
  130. package/Runtime/Public.meta +8 -0
  131. package/Runtime/XD.SDK.Account.asmdef +7 -2
  132. package/Runtime/XD.SDK.Account.asmdef.meta +1 -1
  133. package/Runtime.meta +7 -2
  134. package/package.json +5 -5
  135. package/package.json.meta +2 -2
  136. package/Mobile/Editor/XD.SDK.Account.Mobile.Editor.asmdef +0 -20
  137. package/Mobile/Editor/XD.SDK.Account.Mobile.Editor.asmdef.meta +0 -7
  138. package/Mobile/Editor/XDAccountMobileProcessBuild.cs +0 -20
  139. package/Mobile/Http/XDGAccountHttpConfigMobile.cs +0 -36
  140. package/Mobile/Plugins/Android/com/xd/account/bridge/XDGAccountBridge.java +0 -15
  141. package/Mobile/Plugins/Android/com/xd/account/bridge.meta +0 -8
  142. package/Mobile/Plugins/Android/com/xd/account.meta +0 -8
  143. package/Mobile/Plugins/Android/com/xd.meta +0 -8
  144. package/Mobile/Plugins/Android/com.meta +0 -8
  145. package/Mobile/Plugins/Android.meta +0 -8
  146. package/Mobile/Plugins/iOS/XDAccountBridge.m +0 -26
  147. package/Mobile/Plugins/iOS/XDAccountBridge.m.meta +0 -37
  148. package/Mobile/Plugins/iOS.meta +0 -8
  149. package/Mobile/User/UserManagerMobile.cs +0 -45
  150. package/Mobile/User/UserManagerMobile.cs.meta +0 -3
  151. package/Mobile/User.meta +0 -3
  152. package/Mobile/XD.SDK.Account.Mobile.asmdef +0 -23
  153. package/Mobile/XD.SDK.Account.Mobile.asmdef.meta +0 -7
  154. package/Mobile/XDGAccountMobile.cs +0 -132
  155. package/Mobile/XDGAccountMobileImpl.cs +0 -421
  156. package/Mobile/XDGTokenManager.cs +0 -116
  157. package/Mobile/XDGTokenManager.cs.meta +0 -3
  158. package/Mobile/XDGUserWrapper.cs +0 -167
  159. package/Mobile/XDGUserWrapper.cs.meta +0 -11
  160. package/Plugins/Android/libs/XDGAccount_6.21.1.aar +0 -0
  161. package/Plugins/iOS/XDAccountSDK.framework/Headers/TDSGlobalThirdPartyLoginManager.h +0 -47
  162. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGPhoneAuthManager.h +0 -33
  163. package/README.md +0 -0
  164. package/README.md.meta +0 -7
  165. package/Runtime/Editor/XD.SDK.Account.Editor.asmdef +0 -19
  166. package/Runtime/Editor/XD.SDK.Account.Editor.asmdef.meta +0 -7
  167. package/Runtime/Editor/XDAccountProcessBuild.cs +0 -18
  168. package/Runtime/Editor/XDAccountProcessBuild.cs.meta +0 -11
  169. package/Runtime/Editor.meta +0 -8
  170. package/Runtime/IXDGAccount.cs +0 -42
  171. package/Runtime/IXDGAccount.cs.meta +0 -3
  172. package/Runtime/Internal/Http/IXDAccountHttpConfig.cs +0 -9
  173. package/Runtime/Internal/Http/IXDAccountHttpConfig.cs.meta +0 -11
  174. package/Runtime/Internal/Http/XDAccountHttpConfig.cs +0 -32
  175. package/Runtime/Internal/Http/XDAccountHttpConfig.cs.meta +0 -11
  176. package/Runtime/Internal/Http.meta +0 -8
  177. package/Runtime/Internal/User/IUserManagerPlatformWrapper.cs +0 -7
  178. package/Runtime/Internal/User/IUserManagerPlatformWrapper.cs.meta +0 -3
  179. package/Runtime/Internal/User.meta +0 -3
  180. package/Runtime/UserManager.cs +0 -35
  181. package/Runtime/UserManager.cs.meta +0 -3
  182. package/Runtime/XDGAccessToken.cs +0 -18
  183. package/Runtime/XDGAccessToken.cs.meta +0 -3
  184. package/Runtime/XDGAccount.cs +0 -123
  185. package/Runtime/XDGAccount.cs.meta +0 -3
  186. package/Runtime/XDGLoginType.cs +0 -28
  187. package/Runtime/XDGLoginType.cs.meta +0 -3
  188. package/Runtime/XDGUser.cs +0 -30
  189. package/Runtime/XDGUser.cs.meta +0 -3
  190. package/Runtime/XDGUserStatusCode.cs +0 -16
  191. package/Runtime/XDGUserStatusCode.cs.meta +0 -3
@@ -0,0 +1,3 @@
1
+ fileFormatVersion: 2
2
+ guid: 4164f6e9886d492e8a31f4b54862eef2
3
+ timeCreated: 1752049234
@@ -0,0 +1,87 @@
1
+ using System;
2
+ using System.Collections.Generic;
3
+ using System.Linq;
4
+ using System.Net.Http;
5
+ using System.Threading.Tasks;
6
+ using UnityEngine;
7
+ using XD.SDK.Common;
8
+ using XD.SDK.Common.Internal;
9
+
10
+ namespace XD.SDK.Account
11
+ {
12
+ internal class XDGAccountInternal
13
+ {
14
+ private static IXDGAccountExtended _platformWrapper;
15
+
16
+ static XDGAccountInternal()
17
+ {
18
+ #if UNITY_IOS || UNITY_ANDROID
19
+ _platformWrapper = XD.SDK.Account.Internal.Mobile.AccountFeaturesImpl.Instance;
20
+ #elif UNITY_STANDALONE
21
+ _platformWrapper = XD.SDK.Account.Internal.Standalone.AccountFeaturesImpl.Instance;
22
+ // XDHttpClientFactory.RegisterHeadersTaskFunc(GetRequestAuthorizationHeader);
23
+ #endif
24
+ if (_platformWrapper == null)
25
+ {
26
+ XDGLogger.Error("unsupported platform: " + Application.platform);
27
+ }
28
+ }
29
+
30
+ internal static void AddUserStatusChangeCallback(Action<XDGUserStatusCodeType, string> callback)
31
+ {
32
+ _platformWrapper.AddUserStatusChangeCallback(callback);
33
+ }
34
+
35
+ internal static void LoginByType(LoginType loginType, Action<XDGUser> callback, Action<XDGError> errorCallback)
36
+ {
37
+ _platformWrapper.LoginByType(loginType, callback, errorCallback);
38
+ }
39
+
40
+ // internal static void LoginByConsole(Action<XDGUser> successCallback, Action failCallback,
41
+ // Action<XDGError> errorCallback)
42
+ // {
43
+ // _platformWrapper.LoginByConsole(successCallback, failCallback, errorCallback);
44
+ // }
45
+
46
+ internal static void Logout()
47
+ {
48
+ _platformWrapper.Logout();
49
+ }
50
+
51
+ internal static XDGUser GetCurrentUser()
52
+ {
53
+ return _platformWrapper.GetCurrentUser();
54
+ }
55
+
56
+ internal static void OpenCustomerService(XDGRoleInfo roleInfo, string path, Dictionary<string, object> paramsMap)
57
+ {
58
+ _platformWrapper.OpenCustomerService(roleInfo, path, paramsMap);
59
+ }
60
+
61
+ internal static void OpenUserCenter()
62
+ {
63
+ _platformWrapper.OpenUserCenter();
64
+ }
65
+
66
+ internal static void OpenUserDashboard(XDGRoleInfo roleInfo)
67
+ {
68
+ _platformWrapper.OpenUserDashboard(roleInfo);
69
+ }
70
+
71
+ internal static void OpenAccountDeletion()
72
+ {
73
+ _platformWrapper.OpenAccountDeletion();
74
+ }
75
+
76
+ internal static void BindByType(LoginType loginType, Action<bool, XDGError> callback)
77
+ {
78
+ _platformWrapper.BindByType(loginType, callback);
79
+ }
80
+
81
+ internal static Task<Dictionary<string, string>> GetRequestAuthorizationHeader(HttpRequestMessage request,
82
+ long timestamp)
83
+ {
84
+ return _platformWrapper.GetRequestAuthorizationHeader(request, timestamp);
85
+ }
86
+ }
87
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 0f75d59ccdce4375bdfe59d658b079d7
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 4e09c26405b564b47bdb6137ed3058fe
2
+ guid: 2fe3237295d14f61908cf4d9335c9a47
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}
@@ -0,0 +1,37 @@
1
+ #if XDSDK_DEPRECATED
2
+ using System;
3
+ using System.Collections.Generic;
4
+ using XD.SDK.Common;
5
+
6
+ namespace XD.SDK.Account
7
+ {
8
+ partial class XDGAccount
9
+ {
10
+ [Obsolete("Deprecated in XDSDK 7.x")]
11
+ public static void Login(List<LoginType> loginTypes, Action<XDGUser> callback, Action<XDGError> errorCallback)
12
+ {
13
+
14
+ }
15
+
16
+ [Obsolete("Deprecated in XDSDK 7.x")]
17
+ public static void GetUser(Action<XDGUser> callback, Action<XDGError> errorCallback)
18
+ {
19
+ }
20
+
21
+ [Obsolete("Deprecated in XDSDK 7.x")]
22
+ public static void OpenUnregister()
23
+ {
24
+ }
25
+
26
+ [Obsolete("Deprecated in XDSDK 7.x")]
27
+ public static void IsTokenActiveWithType(LoginType loginType, Action<bool> callback){
28
+ }
29
+
30
+ [Obsolete("Deprecated in XDSDK 7.x")]
31
+ public static string GetLoginTypeString(LoginType loginType)
32
+ {
33
+ return "";
34
+ }
35
+ }
36
+ }
37
+ #endif
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 968bcb88364540a5925c7879cce9b07e
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,107 @@
1
+ using System;
2
+ using System.Collections.Generic;
3
+ using UnityEngine.Scripting;
4
+ using XD.SDK.Account.Internal;
5
+ using XD.SDK.Common;
6
+
7
+ [assembly: Preserve]
8
+ [assembly: AlwaysLinkAssembly]
9
+
10
+ namespace XD.SDK.Account
11
+ {
12
+ public static partial class XDGAccount
13
+ {
14
+ /// <summary>
15
+ /// 注册用户状态变化回调
16
+ /// </summary>
17
+ /// <param name="callback"></param>
18
+ public static void AddUserStatusChangeCallback(Action<XDGUserStatusCodeType, string> callback)
19
+ {
20
+ XDGAccountInternal.AddUserStatusChangeCallback(callback);
21
+ }
22
+
23
+ /// <summary>
24
+ /// 开始登录
25
+ /// </summary>
26
+ /// <param name="loginType">授权类型</param>
27
+ /// <param name="successCallback">登录成功回调</param>
28
+ /// <param name="errorCallback">登录失败回调</param>
29
+ public static void LoginByType(LoginType loginType, Action<XDGUser> successCallback,
30
+ Action<XDGError> errorCallback)
31
+ {
32
+ XDGAccountInternal.LoginByType(loginType, successCallback, errorCallback);
33
+ }
34
+
35
+ public static void LoginByConsole(Action<XDGUser> successCallback, Action failCallback,
36
+ Action<XDGError> errorCallback)
37
+ {
38
+ XDGAccountInternal.LoginByType(LoginType.Console, successCallback, errorCallback);
39
+ }
40
+
41
+ /// <summary>
42
+ /// 退出登录
43
+ /// </summary>
44
+ public static void Logout()
45
+ {
46
+ XDGAccountInternal.Logout();
47
+ }
48
+
49
+ /// <summary>
50
+ /// 获取当前用户信息
51
+ /// </summary>
52
+ /// <returns></returns>
53
+ public static XDGUser GetCurrentUser()
54
+ {
55
+ return XDGAccountInternal.GetCurrentUser();
56
+ }
57
+
58
+ /// <summary>
59
+ /// 打开客服页面
60
+ /// </summary>
61
+ /// <param name="roleInfo">角色信息</param>
62
+ /// <param name="path">XDSDK 客服路径</param>
63
+ /// <param name="paramsMap">XDSDK 客服透传数据</param>
64
+ public static void OpenCustomerService(XDGRoleInfo roleInfo, string path, Dictionary<string, object> paramsMap)
65
+ {
66
+ XDGAccountInternal.OpenCustomerService(roleInfo, path, paramsMap);
67
+ }
68
+
69
+ /// <summary>
70
+ /// 打开用户中心
71
+ /// </summary>
72
+ public static void OpenUserCenter(XDGRoleInfo roleInfo)
73
+ {
74
+ XDGAccountInternal.OpenUserCenter();
75
+ }
76
+
77
+ /// <summary>
78
+ /// 打开个人信息页面
79
+ /// Tips: 仅在国内可用
80
+ /// Tips: 在 PNSDK 环境下不可用
81
+ /// </summary>
82
+ /// <param name="roleInfo"></param>
83
+ public static void OpenUserDashboard(XDGRoleInfo roleInfo)
84
+ {
85
+ XDGAccountInternal.OpenUserDashboard(roleInfo);
86
+ }
87
+
88
+ /// <summary>
89
+ /// 打开注销页面
90
+ /// Tips: 在 PNSDK 环境下不可用
91
+ /// </summary>
92
+ public static void OpenAccountDeletion()
93
+ {
94
+ XDGAccountInternal.OpenAccountDeletion();
95
+ }
96
+
97
+ /// <summary>
98
+ /// 绑定账号
99
+ /// </summary>
100
+ /// <param name="loginType">账号类型</param>
101
+ /// <param name="callback">绑定回调</param>
102
+ public static void BindByType(LoginType loginType, Action<bool, XDGError> callback)
103
+ {
104
+ XDGAccountInternal.BindByType(loginType, callback);
105
+ }
106
+ }
107
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 65e5b5c9cfbe4cf492e53bcfbc85c10b
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: a517e308bd62463d8bfeb317546e2376
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "XD.SDK.Account",
3
+ "rootNamespace": "",
3
4
  "references": [
4
- "GUID:0b3f64ec33f5b4da98a17367a35b82f2",
5
- "GUID:271a06ab0780d4a5ea46c9c3be2ab5dc"
5
+ "XD.SDK.Common",
6
+ "XD.SDK.Foundation",
7
+ "Vuplex.WebView",
8
+ "Unity.TextMeshPro",
9
+ "TapTap.Common.Runtime",
10
+ "TapTap.Login.Runtime"
6
11
  ],
7
12
  "includePlatforms": [],
8
13
  "excludePlatforms": [],
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: c72576b1c89c54ea0a0d748ee92b35c2
2
+ guid: fee691e3ed864e77a1f3888a1d3f6b9c
3
3
  AssemblyDefinitionImporter:
4
4
  externalObjects: {}
5
5
  userData:
package/Runtime.meta CHANGED
@@ -1,3 +1,8 @@
1
1
  fileFormatVersion: 2
2
- guid: ca10f44e0b6a48ffb5ffae02d337e913
3
- timeCreated: 1686564169
2
+ guid: 465e6c87a8714a25bcd30f292bf0ab1a
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "com.xd.sdk.account",
3
- "version": "0.0.1",
4
- "description": "XDSDK",
5
- "unity": "2018.3",
3
+ "displayName": "XDGSDK Account",
4
+ "version": "0.0.10-alpha",
5
+ "description": "XDGSDK",
6
+ "unity": "2019.3",
6
7
  "license": "MIT",
7
8
  "dependencies": {
8
- "com.xd.sdk.common": "0.0.1",
9
- "com.xd.tds.bootstrap": "3.27.1-xd.1"
9
+ "com.xd.sdk.common": "0.0.10-alpha"
10
10
  }
11
11
  }
package/package.json.meta CHANGED
@@ -1,6 +1,6 @@
1
1
  fileFormatVersion: 2
2
- guid: 1c1028f3dafd84b0e913ecc06aa77b3f
3
- TextScriptImporter:
2
+ guid: ef41cc53322742599f0d9c57f38c3a65
3
+ PackageManifestImporter:
4
4
  externalObjects: {}
5
5
  userData:
6
6
  assetBundleName:
@@ -1,20 +0,0 @@
1
- {
2
- "name": "XD.SDK.Account.Mobile.Editor",
3
- "references": [
4
- "GUID:616cea76def2d4f059b94440fc8cc03d",
5
- "GUID:747e53b1749584bae9386571797e5eb5",
6
- "GUID:0acc523941302664db1f4e527237feb3",
7
- "GUID:27619889b8ba8c24980f49ee34dbb44a"
8
- ],
9
- "includePlatforms": [
10
- "Editor"
11
- ],
12
- "excludePlatforms": [],
13
- "allowUnsafeCode": false,
14
- "overrideReferences": false,
15
- "precompiledReferences": [],
16
- "autoReferenced": true,
17
- "defineConstraints": [],
18
- "versionDefines": [],
19
- "noEngineReferences": false
20
- }
@@ -1,7 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 2d1b9e16f6d8a4232bb62304893cb98e
3
- AssemblyDefinitionImporter:
4
- externalObjects: {}
5
- userData:
6
- assetBundleName:
7
- assetBundleVariant:
@@ -1,20 +0,0 @@
1
- using System;
2
- using TapTap.Common.Editor;
3
- using UnityEditor.Build.Reporting;
4
-
5
- namespace XD.SDK.Account.Editor
6
- {
7
- public class XDAccountMobileProcessBuild : SDKLinkProcessBuild {
8
- public override int callbackOrder => 6;
9
-
10
- public override string LinkPath => "XDSDK/Gen/Account/Mobile/link.xml";
11
-
12
- public override LinkedAssembly[] LinkedAssemblies => new LinkedAssembly[] {
13
- new LinkedAssembly { Fullname = "XD.SDK.Account.Mobile" }
14
- };
15
-
16
- public override Func<BuildReport, bool> IsTargetPlatform => (report) => {
17
- return BuildTargetUtils.IsSupportMobile(report.summary.platform);
18
- };
19
- }
20
- }
@@ -1,36 +0,0 @@
1
- using System;
2
- using System.Collections.Generic;
3
- using System.Net.Http;
4
- using System.Threading.Tasks;
5
- using System.Runtime.InteropServices;
6
- using UnityEngine;
7
-
8
- namespace XD.SDK.Account.Internal {
9
- public class XDGAccountHttpConfigMobile : IXDAccountHttpConfig {
10
- public Task<Dictionary<string, string>> GetAuthorizationHeaders(HttpRequestMessage request, long timestamp) {
11
- string url = request.RequestUri.AbsoluteUri;
12
- string method = request.Method.ToString().ToUpper();
13
- string authorization;
14
- #if UNITY_ANDROID
15
- using (AndroidJavaClass AccountBridgeClass = new AndroidJavaClass("com.xd.account.bridge.XDGAccountBridge")) {
16
- authorization = AccountBridgeClass.CallStatic<string>("getAuthorization", url, method, timestamp);
17
- }
18
- #elif UNITY_IOS
19
- IntPtr ptr = XDAccountBridgeGetAuthorization(url, method, timestamp);
20
- authorization = Marshal.PtrToStringAnsi(ptr);
21
- #endif
22
- if (string.IsNullOrEmpty(authorization)) {
23
- return Task.FromResult(new Dictionary<string, string>());
24
- }
25
-
26
- return Task.FromResult(new Dictionary<string, string> {
27
- { "Authorization", authorization }
28
- });
29
- }
30
-
31
- #if UNITY_IOS
32
- [DllImport("__Internal")]
33
- private static extern IntPtr XDAccountBridgeGetAuthorization(string url, string method, long timestamp);
34
- #endif
35
- }
36
- }
@@ -1,15 +0,0 @@
1
- package com.xd.account.bridge;
2
-
3
- import com.xd.intl.common.net.CommonParameterManager;
4
- import com.xd.intl.common.bridge.BridgeUtil;
5
- import com.xd.intl.common.global.GlobalUserStore;
6
-
7
- public class XDGAccountBridge {
8
- public static String getAuthorization(String url, String method, long timestamp) {
9
- return CommonParameterManager.getInstance().getRequestAuthorizationHeaderString(url, method, timestamp * 1000);
10
- }
11
-
12
- public static String getCurrentUser() {
13
- return BridgeUtil.convertUserJsonString4Bridge(GlobalUserStore.INSTANCE.getCurrentXDUser());
14
- }
15
- }
@@ -1,8 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 55964ed8cbf6a4e9a9e371890f284232
3
- folderAsset: yes
4
- DefaultImporter:
5
- externalObjects: {}
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant:
@@ -1,8 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 421618a981cec439e86d2c118263feaf
3
- folderAsset: yes
4
- DefaultImporter:
5
- externalObjects: {}
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant:
@@ -1,8 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 0616f23585cd842d083cda282c97bb43
3
- folderAsset: yes
4
- DefaultImporter:
5
- externalObjects: {}
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant:
@@ -1,8 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: f3105b995c8bf4903867dd4b809ce180
3
- folderAsset: yes
4
- DefaultImporter:
5
- externalObjects: {}
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant:
@@ -1,8 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 1096511754b3f4862ac7f1e9e89c71f3
3
- folderAsset: yes
4
- DefaultImporter:
5
- externalObjects: {}
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant:
@@ -1,26 +0,0 @@
1
- //
2
- // XDAccountBridge.m
3
- // Unity-iPhone
4
- //
5
- // Created by oneRain on 2024/3/6.
6
- //
7
-
8
- #import <Foundation/Foundation.h>
9
- #import <XDCommonSDK/XDGHttpRequest.h>
10
- #import <XDCommonSDK/XDGUser.h>
11
- #import <XDAccountSDK/XDGLoginService.h>
12
- #import <XDCommonSDK/NSDictionary+TDSGlobalJson.h>
13
-
14
- const char* XDAccountBridgeGetAuthorization(const char* url, const char* method, long timestamp) {
15
- NSString *auth = [XDGHttpRequest getMactoken:[NSURL URLWithString:[NSString stringWithUTF8String:url]] method:[NSString stringWithUTF8String:method] time:[[NSNumber numberWithLong:timestamp] stringValue]];
16
- return [auth UTF8String];
17
- }
18
-
19
- const char*XDAccountBridgeGetUser() {
20
- XDGUser *user = [XDGUser currentUser];
21
- if (user.userId == nil || user.userId.length == 0) {
22
- return nil;
23
- }
24
- NSDictionary *userDic = [XDGLoginService bridgeUserDic:user];
25
- return [userDic.tdsglobal_jsonString UTF8String];
26
- }
@@ -1,37 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 66125dbb432024524bd6984a09e3deb3
3
- PluginImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- iconMap: {}
7
- executionOrder: {}
8
- defineConstraints: []
9
- isPreloaded: 0
10
- isOverridable: 0
11
- isExplicitlyReferenced: 0
12
- validateReferences: 1
13
- platformData:
14
- - first:
15
- Any:
16
- second:
17
- enabled: 0
18
- settings: {}
19
- - first:
20
- Editor: Editor
21
- second:
22
- enabled: 0
23
- settings:
24
- DefaultValueInitialized: true
25
- - first:
26
- iPhone: iOS
27
- second:
28
- enabled: 1
29
- settings: {}
30
- - first:
31
- tvOS: tvOS
32
- second:
33
- enabled: 1
34
- settings: {}
35
- userData:
36
- assetBundleName:
37
- assetBundleVariant:
@@ -1,8 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: b6128d4519c6346a8865694df8366f72
3
- folderAsset: yes
4
- DefaultImporter:
5
- externalObjects: {}
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant:
@@ -1,45 +0,0 @@
1
- #if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR
2
- using System;
3
- using System.Threading.Tasks;
4
- using System.Runtime.InteropServices;
5
- using UnityEngine;
6
- using XD.SDK.Common;
7
-
8
- namespace XD.SDK.Account.Internal
9
- {
10
- public class UserManagerMobile : IUserManagerPlatformWrapper
11
- {
12
- public XDGUser GetCurrentUser()
13
- {
14
- XDGUser resultUser = null;
15
- string currentUserString = null;
16
- #if UNITY_ANDROID
17
- using (var accountBridgeClass = new AndroidJavaClass("com.xd.account.bridge.XDGAccountBridge"))
18
- {
19
- currentUserString = accountBridgeClass.CallStatic<string>("getCurrentUser");
20
- }
21
- #elif UNITY_IOS
22
- IntPtr ptr = XDAccountBridgeGetUser();
23
- currentUserString = Marshal.PtrToStringAnsi(ptr);
24
- #endif
25
- if (!string.IsNullOrEmpty(currentUserString))
26
- {
27
- try
28
- {
29
- resultUser = new XDGUserMobile(currentUserString);
30
- }
31
- catch (Exception e)
32
- {
33
- XDGLogger.Warn("convert current user error" + e.Message);
34
- }
35
- }
36
- return resultUser;
37
- }
38
-
39
- #if UNITY_IOS
40
- [DllImport("__Internal")]
41
- private static extern IntPtr XDAccountBridgeGetUser();
42
- #endif
43
- }
44
- }
45
- #endif
@@ -1,3 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: eb185310da4348b9a6fefe0f29d3b396
3
- timeCreated: 1716360010
package/Mobile/User.meta DELETED
@@ -1,3 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 2d55b9ee1dd240858288055da9b63fe8
3
- timeCreated: 1716359995
@@ -1,23 +0,0 @@
1
- {
2
- "name": "XD.SDK.Account.Mobile",
3
- "references": [
4
- "GUID:c72576b1c89c54ea0a0d748ee92b35c2",
5
- "GUID:271a06ab0780d4a5ea46c9c3be2ab5dc",
6
- "GUID:d2c60bf9347574ed480e55a6682a81f4",
7
- "GUID:0ab0f87386c0640798a09051c047d4ab",
8
- "GUID:0b3f64ec33f5b4da98a17367a35b82f2",
9
- "GUID:43c632eee0a6f42cdaf21080b154f3a1"
10
- ],
11
- "includePlatforms": [
12
- "Android",
13
- "iOS"
14
- ],
15
- "excludePlatforms": [],
16
- "allowUnsafeCode": false,
17
- "overrideReferences": false,
18
- "precompiledReferences": [],
19
- "autoReferenced": true,
20
- "defineConstraints": [],
21
- "versionDefines": [],
22
- "noEngineReferences": false
23
- }