File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
core/azure-core/src/main/java/com/azure/core/credential
identity/azure-identity/src/main/java/com/azure/identity Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 1212public interface TokenCredential {
1313 /**
1414 * Asynchronously get a token for a given resource/audience.
15+ *
16+ * This method is called automatically by Azure SDK client libraries.
17+ * You may call this method directly, but you must also handle token
18+ * caching and token refreshing.
19+ *
1520 * @param request the details of the token request
1621 * @return a Publisher that emits a single access token
1722 */
Original file line number Diff line number Diff line change @@ -37,6 +37,17 @@ public class ChainedTokenCredential implements TokenCredential {
3737 this .credentials = Collections .unmodifiableList (credentials );
3838 }
3939
40+ /**
41+ * Sequentially calls {@link TokenCredential#getToken(TokenRequestContext)} on all the specified credentials,
42+ * returning the first successfully obtained {@link AccessToken}.
43+ *
44+ * This method is called automatically by Azure SDK client libraries.
45+ * You may call this method directly, but you must also handle token
46+ * caching and token refreshing.
47+ *
48+ * @param request the details of the token request
49+ * @return a Publisher that emits a single access token
50+ */
4051 @ Override
4152 public Mono <AccessToken > getToken (TokenRequestContext request ) {
4253 List <CredentialUnavailableException > exceptions = new ArrayList <>(4 );
You can’t perform that action at this time.
0 commit comments