I am using a glassfish 4.1 application server for a web application. The web application authentication/authorization is done by a glassfish ldap realm. So I do not have to implement and configure the ldap connection within my application but within the glassfish container. That's good!
Now I need to implement a login method with username/password in my application (WebService). The parameters are passed within a SOAP request. I want to access another configured ldap realm from the glassfish and pass the username/password to it. As a result I want to know whether the user is authorized.
Is it somehow possible to access a security realm of the application server from within the application and perform a login request?