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));
        }
예제 #2
0
 /// <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));
 }