Ejemplo n.º 1
0
 private void HandleAuthenticationLost(object sender, AbstractAuthenticationLostEventArgs e)
 {
     if (e is AbstractAuthenticationRevokedEventArgs && localUser.RegistrationProfile.AccountStatus == AccountStatus.AwaitingParentalConsent)
     {
         this.OnAuthenticationLost(this, new AuthenticationRequiresParentalConsentArgs());
     }
     else
     {
         this.OnAuthenticationLost(this, e);
     }
     database.LogOutSession(localUser.Swid);
     Dispose();
 }
Ejemplo n.º 2
0
 private void onAuthenticationLost(object sender, AbstractAuthenticationLostEventArgs args)
 {
     eventDispatcher.DispatchEvent(default(SessionEvents.AuthenticationLostEvent));
     if (args is AbstractAccountBannedEventArgs)
     {
         AbstractAccountBannedEventArgs abstractAccountBannedEventArgs = args as AbstractAccountBannedEventArgs;
         eventDispatcher.DispatchEvent(new SessionErrorEvents.AccountBannedEvent(AlertType.Unknown, abstractAccountBannedEventArgs.ExpirationDate));
     }
     else if (args is AbstractAuthenticationRequiresParentalConsentArgs)
     {
         eventDispatcher.DispatchEvent(default(SessionErrorEvents.AuthenticationRequiresParentalConsentEvent));
     }
     else if (args is AbstractAuthenticationRevokedEventArgs)
     {
         eventDispatcher.DispatchEvent(default(SessionErrorEvents.AuthenticationRevokedEvent));
     }
     else if (args is AbstractAuthenticationUnavailableEventArgs)
     {
         eventDispatcher.DispatchEvent(default(SessionErrorEvents.AuthenticationUnavailableEvent));
     }
     clearSession();
 }