When the following C# code is executed, the user is prompted (by an ADAL window) to enter a username and password.
AuthenticationContext authContext = new AuthenticationContext("https://login.windows.net/common", false);
AuthenticationResult result = authContext.AcquireToken(serviceUrl, clientId, new Uri(redirectUrl));
I am converting the code to Java using ADAL for Java from GitHub. I do not see any acquireToken() method call that matches the one I used in C#. The code I am currently using is:
AuthenticationContext context = new AuthenticationContext(
"https://login.windows.net/common", false, service);
Future<AuthenticationResult> future = context.acquireToken(RESOURCE_URL, CLIENT_ID, username, password, null);
AuthenticationResult result = future.get();
However, ADAL does not prompt for username/password. I have to add Java code to my console app to do that. Is there a better way? I would prefer to have the same experience as in the C# version.
Thanks
Currently, there isn't support to pop up a ADAL window through Java.