Beispiel #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);
            }
        }
Beispiel #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);
            }
        }
Beispiel #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);
            }
        }
Beispiel #5
0
 protected override Task HandleSignInAsync(SignInContext context)
 {
     throw new NotSupportedException();
 }
Beispiel #6
0
 protected virtual Task HandleSignInAsync(SignInContext context)
 {
     return(Task.FromResult(0));
 }