Beispiel #1
0
        public ConsumerToken GetConsumerTokenFromResponse(string response)
        {
            QueryParameterList paramaterList = QueryUtility.GetQueryParameters(response, String.Empty);

            ConsumerToken consumerToken = new ConsumerToken( );

            foreach (QueryParameter paramater in paramaterList)
            {
                if (paramater.Name == OAuthTokenKey)
                {
                    consumerToken.Token = UrlDecode(paramater.Value);
                }
                else if (paramater.Name == OAuthTokenSecretKey)
                {
                    consumerToken.TokenSecret = UrlDecode(paramater.Value);
                }
                else if (paramater.Name == NextStep)
                {
                    consumerToken.NextStepUrl = UrlDecode(paramater.Value);
                }
            }

            return(consumerToken);
        }
        public override bool Equals(object obj)
        {
            ConsumerToken token = obj as ConsumerToken;

            return(base.Equals(obj) && NextStepUrl.Equals(token.NextStepUrl));
        }