/// <summary>
        /// Called each time a challenge is being sent to the client. By implementing this method the application
        /// may modify the challenge as needed.
        /// </summary>
        /// <param name="context">Contains the default challenge.</param>
        /// <returns>
        /// A <see cref="T:System.Threading.Tasks.Task" /> representing the completed operation.
        /// </returns>
        /// <exception cref="System.NotImplementedException"></exception>
        public Task ApplyChallenge(OAuthChallengeContext context)
        {
            if (_inner != null)
            {
                return _inner.ApplyChallenge(context);
            }

            return Task.FromResult(0);
        }
        protected override Task ApplyResponseChallengeAsync()
        {
            if (Response.StatusCode != 401)
            {
                return(Task.FromResult <object>(null));
            }

            AuthenticationResponseChallenge challenge = Helper.LookupChallenge(Options.AuthenticationType, Options.AuthenticationMode);

            if (challenge != null)
            {
                OAuthChallengeContext challengeContext = new OAuthChallengeContext(Context, _challenge);
                Options.Provider.ApplyChallenge(challengeContext);
            }

            return(Task.FromResult <object>(null));
        }
 /// <summary>
 /// Handles applying the authentication challenge to the response message.
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 public Task ApplyChallenge(OAuthChallengeContext context)
 {
     return OnApplyChallenge(context);
 }
 /// <summary>
 /// Handles applying the authentication challenge to the response message.
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 public Task ApplyChallenge(OAuthChallengeContext context)
 {
     return(OnApplyChallenge(context));
 }
 /// <summary>
 /// Called each time a challenge is being sent to the client. By implementing this method the application
 /// may modify the challenge as needed.
 /// </summary>
 /// <param name="context">Contains the default challenge.</param>
 /// <returns>
 /// A <see cref="T:System.Threading.Tasks.Task" /> representing the completed operation.
 /// </returns>
 /// <exception cref="System.NotImplementedException"></exception>
 public Task ApplyChallenge(OAuthChallengeContext context)
 {
     return Task.FromResult(0);
 }
Example #6
0
 public Task ApplyChallenge(OAuthChallengeContext context)
 {
     return Task.FromResult<object>(null);
 }