public class ClientCredsTokenProvider extends AccessTokenProvider
token| Constructor and Description |
|---|
ClientCredsTokenProvider(String authEndpoint,
String clientId,
String clientSecret)
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 ClientCredsTokenProvider(String authEndpoint, String clientId, String clientSecret)
authEndpoint - the OAuth 2.0 token endpoint associated with the user's directory
(obtain from Active Directory configuration)clientId - the client ID (GUID) of the client web app obtained from Azure Active Directory configurationclientSecret - the secret key of the client web appprotected 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.