Esempio n. 1
0
        public async Task <UserModel> GetAuth(string code)
        {
            var authModel = new UserModel();

            if (Parameters != null & Parameters.Count > 0 || _authClient.UserInfo != null)
            {
                if (_authClient.UserInfo == null)
                {
                    _authClient.UserInfo = await _authClient.GetUserInfo(Parameters);

                    authModel.AccessToken = _authClient.Auth.AccessToken;
                    authModel.UserInfo    = _authClient.UserInfo;
                }
                else
                {
                    authModel.AccessToken = _authClient.Auth.AccessToken;
                    authModel.UserInfo    = _authClient.UserInfo;
                }
            }
            return(authModel);
        }
Esempio n. 2
0
 public async Task <UserInfo> GetUserProfile(NameValueCollection parameters)
 {
     return(await _client.GetUserInfo(parameters));
 }