AppHarbor.Web.Security.AuthenticationCookie.Deserialize C# (CSharp) Method

Deserialize() public static method

public static Deserialize ( byte data ) : AuthenticationCookie
data byte
return AuthenticationCookie
		public static AuthenticationCookie Deserialize(byte[] data)
		{
			return new AuthenticationCookie(data);
		}

Usage Example

Ejemplo n.º 1
0
        public byte[] GetTagData()
        {
            var cookie = _context.Request.Cookies[_configuration.CookieName];

            if (cookie != null)
            {
                using (var protector = new CookieProtector(_configuration))
                {
                    byte[] data;
                    protector.Validate(cookie.Value, out data);
                    var authenticationCookie = AuthenticationCookie.Deserialize(data);
                    return(authenticationCookie.Tag);
                }
            }

            return(null);
        }
All Usage Examples Of AppHarbor.Web.Security.AuthenticationCookie::Deserialize