Exemplo n.º 1
0
 public Task PostAuthenticateAsync(PostAuthenticationContext context)
 {
     Logger.Debug("PostAuthenticateAsync:" + JsonConvert.SerializeObject(context, new JsonSerializerSettings()
     {
         ReferenceLoopHandling = ReferenceLoopHandling.Ignore
     }));
     if (context.SignInMessage != null && !string.IsNullOrEmpty(context.SignInMessage.ClientId))
     {
         var us = UserServiceFinder.Get(context.SignInMessage.ClientId);
         if (us != null)
         {
             return(us.PostAuthenticateAsync(context));
         }
     }
     return(Task.FromResult(0));
 }
Exemplo n.º 2
0
 public Task IsActiveAsync(IsActiveContext context)
 {
     Logger.Debug("IsActiveAsync:" + JsonConvert.SerializeObject(context, new JsonSerializerSettings()
     {
         ReferenceLoopHandling = ReferenceLoopHandling.Ignore
     }));
     if (context.Client != null && !string.IsNullOrEmpty(context.Client.ClientId))
     {
         var us = UserServiceFinder.Get(context.Client.ClientId);
         if (us != null)
         {
             return(us.IsActiveAsync(context));
         }
     }
     return(Task.FromResult(0));
 }