Files
Umbraco-CMS/src/Umbraco.Core/Security/UserData.cs
Shannon c4b44ea0e3 Fixes: U4-2577 Can't save umbraco user - without re-filling in the password
Fixes: U4-541 Wrong dictionary key when using in backend template names
This changes the way that the value that is stored in the auth cookie. Previously we just stored a GUID which was the user's contextid stored in the db, now we store encrypted values of a few necessary user objects. In 6.2 we'll actually set a real .Net user object on the HttpContext. For now, the http module will simply just ensure that the culture is set correctly for the currently logged in user.
2013-08-02 15:16:04 +10:00

51 lines
1.4 KiB
C#

using System;
using System.Runtime.Serialization;
namespace Umbraco.Core.Security
{
/// <summary>
/// Data structure used to store information in the authentication cookie
/// </summary>
[DataContract(Name = "userData", Namespace = "")]
internal class UserData
{
public UserData()
{
AllowedApplications = new string[] {};
Roles = new string[] {};
}
///// <summary>
///// When their session is going to expire (in ticks)
///// </summary>
//[DataMember(Name = "timeout")]
//public long Timeout { get; set; }
[DataMember(Name = "userContextId")]
public string UserContextId { get; set; }
[DataMember(Name = "id")]
public object Id { get; set; }
[DataMember(Name = "roles")]
public string[] Roles { get; set; }
[DataMember(Name = "username")]
public string Username { get; set; }
[DataMember(Name = "name")]
public string RealName { get; set; }
[DataMember(Name = "startContent")]
public int StartContentNode { get; set; }
[DataMember(Name = "startMedia")]
public int StartMediaNode { get; set; }
[DataMember(Name = "allowedApps")]
public string[] AllowedApplications { get; set; }
[DataMember(Name = "culture")]
public string Culture { get; set; }
}
}