16 lines
536 B
C#
16 lines
536 B
C#
public class LdapAuthenticationService : IAuthenticationService
|
|
{
|
|
private readonly IConfiguration _configuration;
|
|
private LdapIntegration _ldapIntegration;
|
|
|
|
public LdapAuthenticationService(IConfiguration configuration, LdapIntegration ldapIntegration)
|
|
{
|
|
_configuration = configuration;
|
|
_ldapIntegration = ldapIntegration;
|
|
}
|
|
|
|
public bool Authenticate(string username, string password)
|
|
{
|
|
return _ldapIntegration == null ? false : _ldapIntegration.TestLogin(username, password);
|
|
}
|
|
} |