protected virtual void ParseParameters(HttpContext httpContext, OAuthRequestContext requestContext)
        {
            // Try to parse the parameters
            OAuthParameters parameters = OAuthParameters.Parse(httpContext.Request, ServiceProviderContext.Settings.ParameterSources);

            /*
             * Check for missing required parameters:
             *
             * The consumer key, signature method, signature, timestamp and nonce parameters
             * are all required
             */
            parameters.RequireAllOf(
                Constants.ConsumerKeyParameter,
                Constants.SignatureMethodParameter,
                Constants.SignatureParameter,
                Constants.TimestampParameter,
                Constants.NonceParameter,
                Constants.CallbackParameter);

            /*
             * The version parameter is optional, but it if is present its value must be 1.0
             */
            if (parameters.Version != null)
            {
                parameters.RequireVersion(Constants.Version1_0);
            }

            requestContext.Parameters = parameters;
        }
        protected virtual void ParseParameters(HttpApplication application, OAuthRequestContext context)
        {
            // Try to parse the parameters
            OAuthParameters parameters = OAuthParameters.Parse(application.Request);

            /*
             * Check for missing required parameters:
             *
             * The consumer key, token, signature method, signature, timestamp and nonce parameters
             * are all required
             */
            if (ServiceProviderContext.Settings.AllowConsumerRequests)
            {
                parameters.RequireAllOf(
                    Constants.ConsumerKeyParameter,
                    Constants.SignatureMethodParameter,
                    Constants.SignatureParameter,
                    Constants.TimestampParameter,
                    Constants.NonceParameter);
            }
            else
            {
                // For 3 legged TokenParameter is required
                parameters.RequireAllOf(
                    Constants.ConsumerKeyParameter,
                    Constants.TokenParameter,
                    Constants.SignatureMethodParameter,
                    Constants.SignatureParameter,
                    Constants.TimestampParameter,
                    Constants.NonceParameter);
            }

            /*
             * The version parameter is optional, but it if is present its value must be 1.0
             */
            if (parameters.Version != null)
            {
                parameters.RequireVersion(Constants.Version1_0);
            }

            context.Parameters = parameters;
        }