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)
Override this method to provide the mechanism to get a token.
|
String |
username()
Gets the user name for the Organization Id account.
|
applyCredentialsFilter, defaultSubscriptionId, domain, environment, getToken, proxy, withDefaultSubscriptionId, withProxygetSchemepublic 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
AzureTokenCredentialsgetToken in class AzureTokenCredentialsresource - the resource the access token is forIOException - exceptions from IOCopyright © 2019. All rights reserved.