using GreenTree.Nachtragsmanagement.Core.Domain.User; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GreenTree.Nachtragsmanagement.Core.Authentication { public interface IUserHelper { /// /// Evaluates the current user from request cookies /// User FromCookiesOrSession(); /// /// Evaluates the current user from request cookies /// /// The hours the authCookie will be increased if it exists. User FromCookiesOrSession(int expirationHoursIncrease); /// /// Writes the current user to response cookies /// /// The current authenticated user. void ToCookiesAndSession(User user); /// /// Writes the current user to response cookies /// /// The current authenticated user. /// Set also the request cookie for further authorization. void ToCookiesAndSession(User user, bool setRequestCookie); /// /// Writes the current user to response cookies /// /// The current authenticated user. /// The cookie expiration date. void ToCookiesAndSession(User user, DateTime expirationDate); /// /// Writes the current user to response cookies /// /// The current authenticated user. /// The cookie expiration date. /// Set also the request cookie for further authorization. void ToCookiesAndSession(User user, DateTime expirationDate, bool setRequestCookie); /// /// Clears the authentication cookie /// void ClearCookieAndSession(); } }