@Beta public final class AzureCliCredentials extends AzureTokenCredentials
| Modifier and Type | Method and Description |
|---|---|
String |
clientId() |
static AzureCliCredentials |
create()
Creates an instance of AzureCliCredentials with the default Azure CLI configuration.
|
static AzureCliCredentials |
create(File azureProfile,
File accessTokens)
Creates an instance of AzureCliCredentials with custom locations of the token files.
|
String |
domain()
Override this method to provide the domain or tenant ID the token is valid in.
|
AzureEnvironment |
environment() |
reactor.core.publisher.Mono<AccessToken> |
getToken(String resource)
Override this method to provide the mechanism to get a token.
|
defaultSubscriptionId, getToken, proxy, withDefaultSubscriptionId, withProxypublic static AzureCliCredentials create() throws IOException
IOException - if the Azure CLI token files are not accessiblepublic static AzureCliCredentials create(File azureProfile, File accessTokens) throws IOException
azureProfile - the azureProfile.json file created by Azure CLIaccessTokens - the accessTokens.json file created by Azure CLIIOException - if the Azure CLI token files are not accessibleFileNotFoundException - if azureProfile or accessTokens is nullpublic String clientId()
public String domain()
AzureTokenCredentialsdomain in class AzureTokenCredentialspublic AzureEnvironment environment()
environment in class AzureTokenCredentialspublic reactor.core.publisher.Mono<AccessToken> getToken(String resource)
AzureTokenCredentialsgetToken in class AzureTokenCredentialsresource - the resource the access token is forCopyright © 2019 Microsoft Corporation. All rights reserved.