Class TokenCredentialAuthProvider
java.lang.Object
com.microsoft.graph.authentication.BaseAuthenticationProvider
com.microsoft.graph.authentication.TokenCredentialAuthProvider
- All Implemented Interfaces:
IAuthenticationProvider
An implementation of the Authentication Provider with Azure-identity
-
Constructor Summary
ConstructorsConstructorDescriptionTokenCredentialAuthProvider(com.azure.core.credential.TokenCredential tokenCredential) Creates an Authentication provider using a passed in TokenCredentialTokenCredentialAuthProvider(List<String> scopes, com.azure.core.credential.TokenCredential tokenCredential) Creates an Authentication provider using a TokenCredential and list of scopes -
Method Summary
Modifier and TypeMethodDescriptiongetAuthorizationTokenAsync(URL requestUrl) Returns an AccessToken as a stringMethods inherited from class com.microsoft.graph.authentication.BaseAuthenticationProvider
getCustomHosts, setCustomHosts, shouldAuthenticateRequestWithUrl
-
Constructor Details
-
TokenCredentialAuthProvider
public TokenCredentialAuthProvider(@Nonnull com.azure.core.credential.TokenCredential tokenCredential) Creates an Authentication provider using a passed in TokenCredential- Parameters:
tokenCredential- Credential object inheriting the TokenCredential interface used to instantiate the Auth Provider
-
TokenCredentialAuthProvider
public TokenCredentialAuthProvider(@Nonnull List<String> scopes, @Nonnull com.azure.core.credential.TokenCredential tokenCredential) Creates an Authentication provider using a TokenCredential and list of scopes- Parameters:
scopes- Specified desired scopes of the Auth ProvidertokenCredential- Credential object inheriting the TokenCredential interface used to instantiate the Auth Provider
-
-
Method Details
-
getAuthorizationTokenAsync
Returns an AccessToken as a string- Parameters:
requestUrl- the outgoing request URL- Returns:
- String representing the retrieved AccessToken
-