@Beta public class AppServiceMSICredentials extends AzureTokenCredentials
| Constructor and Description |
|---|
AppServiceMSICredentials(AzureEnvironment environment)
Creates an MSI credential for app services.
|
AppServiceMSICredentials(AzureEnvironment environment,
String endpoint,
String secret)
Creates an MSI credential for app services.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getToken(String resource) |
AppServiceMSICredentials |
withClientId(String clientId)
Specifies the application id (client id) associated with a user assigned managed service identity
resource that should be used to retrieve the access token.
|
applyCredentialsFilter, defaultSubscriptionId, domain, environment, getToken, proxy, sslSocketFactory, withDefaultSubscriptionId, withProxy, withSslSocketFactorypublic AppServiceMSICredentials(AzureEnvironment environment)
environment - the environment this application is running inpublic AppServiceMSICredentials(AzureEnvironment environment, String endpoint, String secret)
environment - the environment this application is running inendpoint - the MSI endpointsecret - the MSI secretpublic AppServiceMSICredentials withClientId(String clientId)
clientId - application id (client id) of the identity to use when authenticating to Azure AD.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.
*/