import type { ILDAPService } from '@rocket.chat/core-services'; import { ServiceClassInternal } from '@rocket.chat/core-services'; import type { LDAPLoginResult } from '@rocket.chat/core-typings'; import { LDAPManager } from '../../lib/ldap/Manager'; export class LDAPService extends ServiceClassInternal implements ILDAPService { protected name = 'ldap'; async loginRequest(username: string, password: string): Promise { return LDAPManager.login(username, password); } async loginAuthenticatedUserRequest(username: string): Promise { return LDAPManager.loginAuthenticatedUser(username); } async testConnection(): Promise { return LDAPManager.testConnection(); } async testSearch(username: string): Promise { return LDAPManager.testSearch(username); } }