Exemple #1
0
 /// <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);
 }
Exemple #2
0
 /// <summary>
 /// Raise the session authenticated event.
 /// </summary>
 public void RaiseSessionAuthenticated()
 {
     SessionAuthenticated?.Invoke(this, EventArgs.Empty);
 }
Exemple #3
0
 /// <summary>Provides authentication services for this session.</summary>
 public void AuthenticateSession()
 {
     SessionAuthenticated?.Invoke(this);
 }
Exemple #4
0
 /// <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));
 }
Exemple #5
0
 /// <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);
 }