Esempio n. 1
0
 public Task SignInAsync(SignInContext context)
 {
     if (PriorHandler != null)
     {
         return(PriorHandler.SignInAsync(context));
     }
     return(Task.FromResult(0));
 }
        public virtual void SignIn(ISignInContext context)
        {
            if (ShouldHandleScheme(context.AuthenticationScheme))
            {
                SignInContext  = new SignInContext(context.Principal, new AuthenticationProperties(context.Properties));
                SignOutContext = null;
                context.Accept(BaseOptions.Description.Dictionary);
            }

            if (PriorHandler != null)
            {
                PriorHandler.SignIn(context);
            }
        }
Esempio n. 3
0
        public async Task SignInAsync(SignInContext context)
        {
            if (ShouldHandleScheme(context.AuthenticationScheme))
            {
                SignInAccepted = true;
                await HandleSignInAsync(context);

                context.Accept();
            }

            if (PriorHandler != null)
            {
                await PriorHandler.SignInAsync(context);
            }
        }
Esempio n. 4
0
        public async Task SignInAsync(SignInContext context)
        {
            if (ShouldHandleScheme(context.AuthenticationScheme, handleAutomatic: false))
            {
                SignInAccepted = true;
                await HandleSignInAsync(context);

                Logger.LogInformation(3, "AuthenticationScheme: {scheme} signed in.", Options.AuthenticationScheme);
                context.Accept();
            }
            else if (PriorHandler != null)
            {
                await PriorHandler.SignInAsync(context);
            }
        }
Esempio n. 5
0
 protected override Task HandleSignInAsync(SignInContext context)
 {
     throw new NotSupportedException();
 }
Esempio n. 6
0
 protected virtual Task HandleSignInAsync(SignInContext context)
 {
     return(Task.FromResult(0));
 }