/// <summary> /// Event handler for a successfully authenticated session. /// </summary> /// <param name="session">Session that was authenticated</param> private void OnSessionAuthenticated(Session session) { SystemHost.UpdateSystemHost(this, session.ID + " - Authenticated"); SessionAuthenticated?.Invoke(session); }
/// <summary> /// Raise the session authenticated event. /// </summary> public void RaiseSessionAuthenticated() { SessionAuthenticated?.Invoke(this, EventArgs.Empty); }
/// <summary>Provides authentication services for this session.</summary> public void AuthenticateSession() { SessionAuthenticated?.Invoke(this); }
/// <summary> /// Allows sub classes to invoke the SessionAuthenticated event. /// </summary> ///<param name="session">Authenticated session.</param> protected void OnSessionAuthenticated(OAuthSession session) { SessionAuthenticated?.Invoke(this, new SessionAuthenticatedEventArgs(session)); }
/// <summary> /// Mark session as authenticated with a non-null user /// </summary> /// <param name="user">User that was authenticated in this session</param> public void AuthenticateSession(User user) { User = user ?? throw new ArgumentNullException("user", "Authenticated user cannot be null!"); SessionAuthenticated?.Invoke(this); }