Auth Against LDAP receive JWT in Response?

Hi there, i’m new to Kong API and i have following (maybe strange?) Question.

  • I have an Angular Frontend, that authenticates with JWT against an Microservice (Lumen API)
  • We want to use Kong to handle those Requests in front of the Lumen API and Authenticate against LDAP.

Is it possible to let the Angular Frontend send the authentication against the LDAP plugin and receive the JWT Token?

This is what the Angular App does:
const requestOptions = new RequestOptions({headers: head});
return this.http.post(environment.baseUrl + ‘/auth/login’,
JSON.stringify(credentials), requestOptions).
map(response => {
console.log(response);
const result = response.json();
if (result && result.token) {
localStorage.setItem(‘token’, result.token);
return true;
}
return false;
});
}

Best Regards
Marco