public class UserPasswordTokenProvider extends AccessTokenProvider
token| Constructor and Description |
|---|
UserPasswordTokenProvider(String clientId,
String username,
String password)
constructs a token provider based on supplied credentials.
|
| Modifier and Type | Method and Description |
|---|---|
protected AzureADToken |
refreshToken()
the method to fetch the access token.
|
getTokenpublic UserPasswordTokenProvider(String clientId, String username, String password)
username - the usernameclientId - the client ID (GUID) obtained from Azure Active Directory configurationpassword - the passwordprotected AzureADToken refreshToken() throws IOException
AccessTokenProviderThis method will be called initially, and then once when the token is about to expire.
refreshToken in class AccessTokenProviderAzureADToken containing the access tokenIOException - if there is an error fetching the tokenCopyright © 2019 Microsoft Corporation. All rights reserved.