Example #1
0
 internal Authentication(RawAuthentication authentication)
 {
     Token = authentication.Token;
     Permissions = authentication.Permissions;
     User = new User(authentication.User);
 }
Example #2
0
        public void GetToken(string frob, TokenCallback callback)
        {
            if (!Syncing)
            {
                User user = new User("rtm.is.unsynced", "IronCow is currently disabled");
                callback(string.Empty, user);
            }
            else
            {
                Dictionary<string, string> parameters = new Dictionary<string, string>();
                parameters.Add("frob", frob);

                GetResponse("rtm.auth.getToken", parameters, (response) =>
                {
                    AuthToken = response.Authentication.Token;
                    User user = new User(response.Authentication.User);
                    callback(response.Authentication.Token, user);
                });
            }
        }