Beispiel #1
0
        private void ValidateClientAuthAccessRequestState()
        {
            if (AccessTokenUrl.IsNullOrBlank())
            {
                throw new ArgumentException("You must specify an access token URL");
            }

            if (ConsumerKey.IsNullOrBlank())
            {
                throw new ArgumentException("You must specify a consumer key");
            }

            if (ConsumerSecret.IsNullOrBlank())
            {
                throw new ArgumentException("You must specify a consumer secret");
            }

            if (ClientUsername.IsNullOrBlank() || ClientPassword.IsNullOrBlank())
            {
                throw new ArgumentException("You must specify user credentials");
            }
        }
Beispiel #2
0
        private void ValidateAccessRequestState()
        {
            if (AccessTokenUrl.IsNullOrBlank())
            {
                throw new ArgumentException("You must specify an access token URL");
            }

            if (ConsumerKey.IsNullOrBlank())
            {
                throw new ArgumentException("You must specify a consumer key");
            }

            if (ConsumerSecret.IsNullOrBlank())
            {
                throw new ArgumentException("You must specify a consumer secret");
            }

            if (Token.IsNullOrBlank())
            {
                throw new ArgumentException("You must specify a token");
            }
        }
Beispiel #3
0
        private void ValidateProtectedResourceState()
        {
            if (ConsumerKey.IsNullOrBlank())
            {
                throw new ArgumentException("You must specify a consumer key");
            }

            if (ConsumerSecret.IsNullOrBlank())
            {
                throw new ArgumentException("You must specify a consumer secret");
            }

            /*
             * if (Token.IsNullOrBlank())
             * {
             *  throw new ArgumentException("You must specify a token");
             * }
             *
             * if (TokenSecret.IsNullOrBlank())
             * {
             *  throw new ArgumentException("You must specify a token secret");
             * }
             */
        }