Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG Bash] Azure client authenticated with InteractiveBrowserCredential keep running after main method #1221

Open
3 tasks done
Flanker32 opened this issue Jun 15, 2020 · 0 comments
Labels
Mgmt Issues that refer to the management plane v2

Comments

@Flanker32
Copy link
Contributor

Flanker32 commented Jun 15, 2020

Describe the bug
Codes with Azure client authenticated with InteractiveBrowserCredential keep running after main method done.

To Reproduce
Steps to reproduce the behavior:
Run codes in Code Snippet

Code Snippet
Add the code snippet that causes the issue.

        AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
        TokenCredential credential = new InteractiveBrowserCredentialBuilder()
                .port(8081)
                .clientId("CLIENT_ID").build();
        Azure azure = Azure
                .authenticate(credential, profile)
                .withSubscription("SUBSCRIPTION");
        for (Subscription subscription : azure.subscriptions().list()) {
            System.out.println(subscription.displayName());
        }

Expected behavior
Program should exit automatically after main method done.

Setup (please complete the following information):

  • JRE Version: [e.g. Open JDK 8] Oracle JDK 1.8.0_241
  • SDK Version: [e.g. 2.0.0-SNAPSHOT] 2.0.0-SNAPSHOT

Additional context
Besides, is there any method to set the redirect page content after user authenticated in browser? For now it's an empty page without auto close.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mgmt Issues that refer to the management plane v2
Projects
None yet
Development

No branches or pull requests

1 participant