本文整理汇总了C#中AuthenticationEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# AuthenticationEventArgs类的具体用法?C# AuthenticationEventArgs怎么用?C# AuthenticationEventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AuthenticationEventArgs类属于命名空间,在下文中一共展示了AuthenticationEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Authentication_LoggedIn
private void Authentication_LoggedIn(object sender, AuthenticationEventArgs e)
{
this.UpdateLoginState();
if (LoginStatusChanged != null)
{
LoginStatusChanged(this, new LoginStatusChangedEventArgs(Events.LoginStatus.Login));
}
}
示例2: PublishUserRoles
public void PublishUserRoles(object sender, AuthenticationEventArgs args)
{
UserRoleService.GetInstance().UserRoles = new ObservableCollection<string>(
WebContext.Current.User.Roles
);
/* Messanger.Get<UserLoginMessage>().Publish(
new UserLoginEventArgs
{
UserName = WebContext.Current.User.DisplayName,
UserRoles = new List<string>(WebContext.Current.User.Roles)
});*/
}
示例3: Authenticated
private void Authenticated(object sender, AuthenticationEventArgs e)
{
room = JabberSession.ConferenceManager.GetRoom(ConferenceJid);
room.OnJoin += r => JabberSession.Invoke(() => room_OnJoin(r));
room.OnLeave += (r, p) => JabberSession.Invoke(() => room_OnLeave(r, p));
room.OnSubjectChange += room_OnSubjectChange;
room.OnPresenceError += (r, p) => JabberSession.Invoke(() => room_OnPresenceError(r, p));
room.OnSelfMessage += (s, msg) => JabberSession.Invoke(() => room_OnSelfMessage(s, msg));
room.OnAdminMessage += (s, msg) => JabberSession.Invoke(() => room_OnAdminMessage(s, msg));
room.OnRoomMessage += (s, msg) => JabberSession.Invoke(() => room_OnRoomMessage(s, msg));
room.OnParticipantJoin += (r, p) => JabberSession.Invoke(() => room_OnParticipantJoin(r, p));
room.OnParticipantLeave += (r, p) => JabberSession.Invoke(() => room_OnParticipantLeave(r, p));
room.Join();
}
示例4: Authentication_LoggedOut
void Authentication_LoggedOut(object sender, AuthenticationEventArgs e)
{
viewOrchestrator.ChangeView(RegionNames.MAIN_REGION, "LoginView");
viewOrchestrator.DeactivateView(RegionNames.HEADER_REGION, "StatusView");
}
示例5: AuthenticationLoggedOut
public override void AuthenticationLoggedOut(object sender, AuthenticationEventArgs e)
{
}
示例6: AuthenticationLoggedOut
public override void AuthenticationLoggedOut(object sender, AuthenticationEventArgs e)
{
UpdateHomeUI();
}
示例7: UserLoginChange
private void UserLoginChange(object sender, AuthenticationEventArgs e)
{
ResourceAuthenticate();
}
示例8: AuthenticationLoggedOut
private void AuthenticationLoggedOut(object sender, AuthenticationEventArgs e)
{
customers.Clear();
}
示例9: AuthenticationLoggedOut
public virtual void AuthenticationLoggedOut(object sender, AuthenticationEventArgs e)
{
IsLoggedIn = false;
}
示例10: Authenticated
static void Authenticated(object sender, AuthenticationEventArgs e)
{
Console.WriteLine(@"Connected ({0})", e);
}
示例11: OnConnectionDropped
private void OnConnectionDropped(object sender, AuthenticationEventArgs e)
{
room = null;
IsConnected = false;
Disconnected(this, new DisconnectEventArgs(ConnectionErrorKind.ConnectionError, e.ErrorMessage));
}
示例12: _service_LoggedOut
private void _service_LoggedOut(object sender, AuthenticationEventArgs e)
{
if (AuthenticationChanged != null)
AuthenticationChanged(this, e);
}
示例13: GetAuthorization
void GetAuthorization()
{
if (ConnectionInformation.AuthenticationMethod == AuthenticationMethod.None) return;
string authorizationLine = GetHeaderValue("Authorization");
if (string.IsNullOrEmpty(authorizationLine)) return;
string[] split = authorizationLine.Split(' ');
if (split.Length < 2) return;
AuthenticationEventArgs e;
switch (split[0])
{
case "Basic":
byte[] buffer = Convert.FromBase64String(split[1]);
string[] userpass = Encoding.ASCII.GetString(buffer).Split(':');
e = new AuthenticationEventArgs(userpass[0], string.Empty, AuthenticationMethod.Basic);
OnAuthenticateHandler(e);
if (e.Accept && e.Password == userpass[1])
{
ci.LogonUser = e.Login;
ci.AuthPassword = e.Password;
}
break;
case "Digest":
if (split.Length < 3)
{
split = split[1].Split(',').Select(s => s.Trim()).ToArray();
}
var digest = new DigestAuthenticationProcessor(split);
digest.Method = httpMethod;
e = new AuthenticationEventArgs(digest.Username, string.Empty, AuthenticationMethod.Digest);
OnAuthenticateHandler(e);
if (e.Accept && digest.CheckValid(e.Password))
{
ci.LogonUser = e.Login;
ci.AuthPassword = e.Password;
}
break;
}
}
示例14: AuthenticationLoggedOut
public override void AuthenticationLoggedOut(object sender, AuthenticationEventArgs e)
{
AreButtonsVisible = false;
}
示例15: AuthenticationLoggedOut
private void AuthenticationLoggedOut(object sender, AuthenticationEventArgs e)
{
if (CanExecuteChanged != null)
CanExecuteChanged.Invoke(this, new EventArgs());
}