Kerberos Authentication with Java EWS API

I am using EWS JAVA API to connect and get data from EWS. Currently I can do this via NTLM authentication by specifying my username and password in the code:

ExchangeCredentials credentials = new WebCredentials("username", "password", "domain");

      

However, I would like to perform Kerberos authentication (i.e. not explicitly specify a password). To give a high-level image, the interaction would be:

User <-> MyWebApplication <-> EWS

      

I can get user information (username, realm / domain) in MyWebApplication. However, I'm not sure how I can generate a Kerberos token and pass authorization (like Negotiate) in the HTTP header to the EWS using the library mentioned.

Please let me know if anyone has managed to achieve something like this. In the worst case, I am open to not using the library at all and will just write my own implementation.

(I know a commercial library from IndependentSoft, but I am not able to use it)

+3


source to share





All Articles