Beispiel #1
0
        public void Authorize(string authKey, string username, string password, Action <OAuthResponse> success = null, Action <OAuthResponse> error = null)
        {
            OAuth.FlowPasswordCredentials(
                username, password,
                (OAuthResponse response) => {
                Authorization = new KeyValuePair <string, string>(authKey, response.access_token);

                if (success != null)
                {
                    success(response);
                }
            },
                (OAuthResponse response) => {
                if (error != null)
                {
                    error(response);
                }
            }
                );
        }