public static HttpRequest ForOAuth2ProtectedResource(
            this HttpRequest instance,
            string accessToken,
            string accessTokenName)
        {
            if (instance == null)
            {
                throw new NullReferenceException();
            }

            var authenticator = new OAuth2ProtectedResource(
                accessToken,
                accessTokenName);

            return(instance.Authenticator(authenticator));
        }
        public static HttpRequest ForOAuth1RequestToken(
            this HttpRequest instance,
            string consumerKey,
            string consumerSecret,
            string callbackUri)
        {
            if (instance == null)
            {
                throw new NullReferenceException();
            }

            var authenticator = new OAuth1RequestToken(
                consumerKey,
                consumerSecret,
                callbackUri);

            return(instance.Authenticator(authenticator));
        }
        public static HttpRequest ForOAuth2RefreshToken(
            this HttpRequest instance,
            string clientId,
            string clientSecret,
            string refreshToken)
        {
            if (instance == null)
            {
                throw new NullReferenceException();
            }

            var authenticator = new OAuth2RefreshToken(
                clientId,
                clientSecret,
                refreshToken);

            return(instance.Authenticator(authenticator));
        }
        public static HttpRequest ForOAuth2AccessToken(
            this HttpRequest instance,
            string clientId,
            string clientSecret,
            string redirectUrl,
            string code,
            string scope)
        {
            if (instance == null)
            {
                throw new NullReferenceException();
            }

            var authenticator = new OAuth2AccessToken(
                clientId,
                clientSecret,
                redirectUrl,
                code,
                scope);

            return(instance.Authenticator(authenticator));
        }
        public static HttpRequest ForOAuth1AccessToken(
            this HttpRequest instance,
            string consumerKey,
            string consumerSecret,
            string oauthToken,
            string oauthSecret,
            string verifier)
        {
            if (instance == null)
            {
                throw new NullReferenceException();
            }

            var authenticator = new OAuth1AccessToken(
                consumerKey,
                consumerSecret,
                oauthToken,
                oauthSecret,
                verifier);

            return(instance.Authenticator(authenticator));
        }