コード例 #1
0
 internal void Set(CredentialsInternal?other)
 {
     if (other != null)
     {
         Token = other.Value.Token;
         Type  = other.Value.Type;
     }
 }
コード例 #2
0
 public void Set(Credentials other)
 {
     if (other != null)
     {
         m_ApiVersion = ConnectInterface.CredentialsApiLatest;
         Token        = other.Token;
         Type         = other.Type;
     }
 }
コード例 #3
0
 internal void Set(CredentialsInternal?other)
 {
     if (other != null)
     {
         Id    = other.Value.Id;
         Token = other.Value.Token;
         Type  = other.Value.Type;
         SystemAuthCredentialsOptions = other.Value.SystemAuthCredentialsOptions;
         ExternalType = other.Value.ExternalType;
     }
 }
コード例 #4
0
 public void Set(Credentials other)
 {
     if (other != null)
     {
         m_ApiVersion = AuthInterface.CredentialsApiLatest;
         Id           = other.Id;
         Token        = other.Token;
         Type         = other.Type;
         SystemAuthCredentialsOptions = other.SystemAuthCredentialsOptions;
         ExternalType = other.ExternalType;
     }
 }
コード例 #5
0
        /// <summary>
        /// 非同期 Login
        /// </summary>
        /// <param name="type">ログイン種別</param>
        /// <param name="id">ID</param>
        /// <param name="token">トークン</param>
        /// <returns>タスク</returns>
        public static async UniTask <LoginCallbackInfo> Login(this ConnectInterface conn, string token, ExternalCredentialType type)
        {
            var op = new LoginOptions
            {
                Credentials = new Credentials
                {
                    Token = token,
                    Type  = type,
                },
            };
            LoginCallbackInfo info = null;

            conn.Login(op, null, e =>
            {
                info = e;
            });

            while (info == null)
            {
                await UniTask.NextFrame();
            }

            if (info.ResultCode == Result.Success)
            {
                return(info);
            }
            Debug.LogError($"error {DebugTools.GetClassMethodName()}:{info.ResultCode}");
            return(null);
        }