26 lines
664 B
C#
26 lines
664 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using uWine.Core.Domain.Entities;
|
|
using uWine.Core.Domain.Repositories;
|
|
|
|
namespace uWine.Core.Infrastructure.Services
|
|
{
|
|
public class AuthenticationService
|
|
{
|
|
readonly IAuthenticationRepository _authenticationRepository;
|
|
|
|
public AuthenticationService(IAuthenticationRepository authenticationRepository)
|
|
{
|
|
_authenticationRepository = authenticationRepository;
|
|
}
|
|
|
|
public bool IsAuthenticated(User user)
|
|
{
|
|
return _authenticationRepository.Valid(user);
|
|
}
|
|
}
|
|
}
|