Exemplo n.º 1
0
        public UserLoginSession(Guid token, User user, DateTime expires)
        {
            Id = token;
            User = user;
            Expires = expires;

            Claims = string.Join(",", user.UserRoles.Select(x => x.Description));
        }
Exemplo n.º 2
0
        public UserLoginSession Create(User executor)
        {
            DateTime dateTime = _tokenExpirationProvider.GetExpiration(_timeProvider.Now());
            Guid token = _identityGenerator.Generate();

            var userSession = new UserLoginSession(token, executor, dateTime);

            _writeableRepository.Create(userSession);

            return userSession;
        }
Exemplo n.º 3
0
 public PasswordResetToken(Guid id, User user, DateTime created)
 {
     Id = id;
     User = user;
     Created = created;
 }