public class MsiTokenProvider extends AccessTokenProvider
token
Constructor and Description |
---|
MsiTokenProvider()
Constructs a token provider that fetches tokens from the MSI token-service running on an Azure IaaS VM.
|
MsiTokenProvider(int localPort)
Deprecated.
localPort is not relevant anymore in the new MSI mechanism
|
MsiTokenProvider(int localPort,
String tenantGuid)
Deprecated.
localPort is not relevant anymore in the new MSI mechanism
|
MsiTokenProvider(String tenantGuid,
String clientId) |
Modifier and Type | Method and Description |
---|---|
protected AzureADToken |
refreshToken()
the method to fetch the access token.
|
getToken
public MsiTokenProvider()
@Deprecated public MsiTokenProvider(int localPort)
localPort
- port on localhost for the MSI token service. (the port that was set in the deployment template).
If 0 or negative number is specified, then assume default port number of 50342.@Deprecated public MsiTokenProvider(int localPort, String tenantGuid)
localPort
- port on localhost for the MSI token service. (the port that was set in the deployment template).
If 0 or negative number is specified, then assume default port number of 50342.tenantGuid
- (optional) AAD Tenant ID guid
. Can be null
.protected AzureADToken refreshToken() throws IOException
AccessTokenProvider
This method will be called initially, and then once when the token is about to expire.
refreshToken
in class AccessTokenProvider
AzureADToken
containing the access tokenIOException
- if there is an error fetching the tokenCopyright © 2019 Microsoft Corporation. All rights reserved.