use of com.microsoft.intellij.ui.SignInWindow in project azure-tools-for-java by Microsoft.
the class AzureSignInAction method showSignInWindowAndGetAuthConfiguration.
private static AuthConfiguration showSignInWindowAndGetAuthConfiguration(Project project) throws InterruptedException {
final SignInWindow dialog = new SignInWindow(new AuthMethodDetails(), project);
if (!dialog.showAndGet()) {
throw new InterruptedException("user cancel");
}
AuthConfiguration auth = new AuthConfiguration();
AuthType type = dialog.getData();
auth.setType(type);
if (type == AuthType.SERVICE_PRINCIPAL) {
final ServicePrincipalLoginDialog spDialog = new ServicePrincipalLoginDialog(project);
if (!spDialog.showAndGet()) {
throw new InterruptedException("user cancel");
}
auth = spDialog.getData();
}
return auth;
}
Aggregations