- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
try
{
var ticketInfo =
WebServicesRepository.XLoginInstance.XLoginTicketHandler(ticket.Ticket);
if (!(ticketInfo.Errors.Length > 0))
FormsAuthenticationUtility.SetAuthCookie(ticketInfo.UserID, ticketInfo.UserLogin, ticketInfo.UserPassword, ticketInfo.Email, false);
var profile =
AccountRepository.GetUserProfile(ticketInfo.Email, ticketInfo.UserPassword) ?? null;
var authForm =
new AuthenticateForm()
{
Login = profile.Login,
Password = profile.Password,
IsPersistent = true
};
AccountRepository.SignIn(authForm, ref errors);
}
catch(Exception e)
{
log.Error("Автоматическая авторизация", e);
};