Hi, From Colombia thanks for this libs. But I have a Question. I am using UserService of loopback/security.
This asynchronous library called verifyCredentials and returns a promise. How do I make auth.authenticate wait to return the promise? Thank you very much.
async verifyCredentials(credentials: Credentials): Promise<Usuario> {
auth.authenticate(username + '@upra.local', credentials.contrasenia, (err, user) => {
console.error('LdapAuth: ', err);
if (!err) {
console.error('LdapAuth: ', user);
return new Usuario();
} else {
throw new HttpErrors.Unauthorized(invalidCredentialsError);
}
});
return new Usuario();
}
Hi, From Colombia thanks for this libs. But I have a Question. I am using UserService of loopback/security. This asynchronous library called verifyCredentials and returns a promise. How do I make auth.authenticate wait to return the promise? Thank you very much.