using System;

namespace DiplomovaPrace.Web.Server.Infrastructure.Security
{
	public class UserContextInfo
	{
		public string Username
		{
			get;
		}

		public UserContextInfo(string username)
		{
			Username = username;
		}

		public override int GetHashCode()
		{
			return HashCode.Combine(Username);
		}

		public override bool Equals(object obj)
		{
			if (ReferenceEquals(this, obj))
			{
				return true;
			}

			UserContextInfo userContextInfoObj = (UserContextInfo)obj;
			if (userContextInfoObj == null)
			{
				return false;
			}

			return Username == userContextInfoObj.Username;
		}
	}
}
