public class UserTokenCredentials extends AzureTokenCredentials
| Constructor and Description |
|---|
UserTokenCredentials(String clientId,
String domain,
String username,
String password,
AzureEnvironment environment)
Initializes a new instance of the UserTokenCredentials.
|
| Modifier and Type | Method and Description |
|---|---|
String |
clientId()
Gets the active directory application client id.
|
String |
getToken(String resource) |
String |
username()
Gets the user name for the Organization Id account.
|
applyCredentialsFilter, defaultSubscriptionId, domain, environment, getToken, proxy, sslSocketFactory, withDefaultSubscriptionId, withProxy, withSslSocketFactorypublic UserTokenCredentials(String clientId, String domain, String username, String password, AzureEnvironment environment)
clientId - the active directory application client id.domain - the domain or tenant id containing this application.username - the user name for the Organization Id account.password - the password for the Organization Id account.environment - the Azure environment to authenticate with.
If null is provided, AzureEnvironment.AZURE will be used.public String clientId()
public String username()
public String getToken(String resource) throws IOException
getToken in class AzureTokenCredentialsIOException/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/