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.
|
getToken
public 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
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.