Authenticate consumers throw WS-Security & LDAP

I’d like to authenticate consumers using mediator/centrasite using WS-Security username token and an LDAP.

Could you please tell me where i could find the manner to implement this authentication throw LDAP step ?

I’d like to manipulate this authentication token to authenticate the ESB in the backend, is it possible using mediator ?