/// <summary>
        /// Validate asynchronously the punchout setup request and token based authentication
        /// </summary>
        /// <param name="url">The Uri the request is sent to.</param>
        /// <param name="credentials">ApiCredentials</param>
        /// <returns></returns>
        private string ValidateAsync(string url, ApiCredentials credentials = null)
        {
            if (IsAuthenticationEnabled)
            {
                if (credentials.IsNotNull())
                {
                    this.Credentials = credentials;
                }

                // Punchout setup request
                if (this.CurrentEndpoint.IsNull())
                {
                    return("PUNCHOUT_SETUP_REQUEST");
                }

                // Authentication / Authorization
                if (url.StartsWith("authenticate") == false && this.CurrentToken.IsNull())
                {
                    //await Authenticate();
                    return("AUTHENTICATE");
                }
            }

            return("OK");
        }
        /// <summary>
        /// Validate the punchout setup request and token based authentication
        /// </summary>
        /// <param name="url">The Uri the request is sent to.</param>
        /// <param name="credentials">ApiCredentials</param>
        private void Validate(string url, ApiCredentials credentials = null)
        {
            if (IsAuthenticationEnabled)
            {
                if (credentials.IsNotNull())
                {
                    this.Credentials = credentials;
                }

                // Punchout setup request
                if (this.CurrentEndpoint.IsNull())
                {
                    throw new Exception("Please carry out the punchout setup request in order to continue.");
                }

                // Authentication / Authorization
                if (url.StartsWith("authenticate") == false && this.CurrentToken.IsNull())
                {
                    throw new Exception("The current token is null or empty");
                }
            }
        }