// OAuth 2.0 Bearer Token
 public Authentication(
     TwitterRequest request,
     string bearerToken
     )
 {
     HttpMethod = request.HttpMethod.ToString();
     Uri        = request.GetUri();
     AuthHeader = $"Bearer {bearerToken}";
 }
        // Basic Authentication
        public Authentication(
            TwitterRequest request,
            string apiKey, string apiSecret
            )
        {
            HttpMethod = request.HttpMethod.ToString();
            Uri        = request.GetUri();
            string basicAuth = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{apiKey}:{apiSecret}"));

            AuthHeader = $"Basic {basicAuth}";
        }
        // ----------------------------------------------------------------------------------------
        // Constructors
        // OAuth 1.0a
        public Authentication(
            TwitterRequest request,
            string apiKey, string apiSecret,
            string accessToken, string accessTokenSecret,
            string nonce = null, string timestamp = null)
        {
            _apiKey            = apiKey;
            _apiSecret         = apiSecret;
            _accessToken       = accessToken;
            _accessTokenSecret = accessTokenSecret;

            Nonce     = nonce ?? GetNonce();
            Timestamp = timestamp ?? GetUnixTime();

            SigningKey = $"{Uri.EscapeDataString(_apiSecret)}&{Uri.EscapeDataString(_accessTokenSecret)}";

            HttpMethod = request.HttpMethod.ToString();
            Uri        = request.GetUri();

            string baseUri;

            if (Uri.Query != string.Empty)
            {
                baseUri = Uri.AbsoluteUri.Replace(Uri.Query, null);
            }
            else
            {
                baseUri = Uri.AbsoluteUri;
            }

            SetParameterString();

            SignatureBaseString = $"{HttpMethod}&{Uri.EscapeDataString(baseUri)}&{Uri.EscapeDataString(ParameterString)}";

            SetOAuthSignature();
            SetOAuthHeaderString();
        }