AuthAttempt Event
Fires when a connected client makes an authentication attempt.
Syntax
public event OnAuthAttemptHandler OnAuthAttempt; public delegate void OnAuthAttemptHandler(object sender, HttpserverAuthAttemptEventArgs e); public class HttpserverAuthAttemptEventArgs : EventArgs { public long ConnectionID { get; } public string Username { get; } public string Password { get; } public bool Allow { get; set; } }
Public Event OnAuthAttempt As OnAuthAttemptHandler Public Delegate Sub OnAuthAttemptHandler(sender As Object, e As HttpserverAuthAttemptEventArgs) Public Class HttpserverAuthAttemptEventArgs Inherits EventArgs Public ReadOnly Property ConnectionID As Long Public ReadOnly Property Username As String Public ReadOnly Property Password As String Public Property Allow As Boolean End Class
Remarks
The component fires this event whenever a client attempts to authenticate itself. Use the Allow parameter to let the client through.
ConnectionID contains the unique session identifier for that client, and Username and Password contain the professed credentials.