public Task SignInAsync(SignInContext context)
 {
     if (PriorHandler != null)
     {
         return PriorHandler.SignInAsync(context);
     }
     return Task.FromResult(0);
 }
예제 #2
0
 public Task SignInAsync(SignInContext context)
 {
     throw new NotImplementedException();
 }
 public Task SignInAsync(SignInContext context)
 {
     SignedIn = true;
     context.Accept();
     return Task.FromResult(0);
 }
        public override async Task SignInAsync(string authenticationScheme, ClaimsPrincipal principal, AuthenticationProperties properties)
        {
            if (string.IsNullOrEmpty(authenticationScheme))
            {
                throw new ArgumentException(nameof(authenticationScheme));
            }

            if (principal == null)
            {
                throw new ArgumentNullException(nameof(principal));
            }

            var handler = HttpAuthenticationFeature.Handler;

            var signInContext = new SignInContext(authenticationScheme, principal, properties?.Items);
            if (handler != null)
            {
                await handler.SignInAsync(signInContext);
            }

            if (!signInContext.Accepted)
            {
                throw new InvalidOperationException($"No authentication handler is configured to handle the scheme: {authenticationScheme}");
            }
        }
 public Task SignInAsync(SignInContext context)
 {
     context.Accept();
     return TaskCache.CompletedTask;
 }
        public Task SignInAsync(SignInContext context)
        {
            // Not supported, fall through
            if (PriorHandler != null)
            {
                return PriorHandler.SignInAsync(context);
            }

            return Task.FromResult(0);
        }