Interface TokenCredential
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface TokenCredential
The interface for credentials that can provide a token.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
TokenCredential.TokenCredentialCallback
The callback type to receive the token retrieval result.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
getToken(TokenRequestContext request, TokenCredential.TokenCredentialCallback callback)
Asynchronously get a token for a given resource/audience.
-
-
-
Method Detail
-
getToken
void getToken(TokenRequestContext request, TokenCredential.TokenCredentialCallback callback)
Asynchronously get a token for a given resource/audience. This method is called automatically by Azure SDK client libraries. You may call this method directly, but you must also handle token caching and token refreshing.- Parameters:
request
- the details of the token requestcallback
- the callback to receive the token retrieval result.
-
-