You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4622566
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -24,6 +26,8 @@ public class TokenCredentialAuthProvider implements ICoreAuthenticationProvider
24
26
privateTokenCredentialtokenCredential;
25
27
//Context options which can be optionally set by the user
26
28
privateTokenRequestContextcontext;
29
+
// maximum delay to wait for token obtention
30
+
privateDurationtokenBlockTimeout;
27
31
28
32
29
33
//TODO: Upon further review from Peter, this should include a Null check in the case that this is the first request
@@ -43,6 +47,7 @@ public TokenCredentialAuthProvider(@Nonnull final TokenCredential tokenCredenti
43
47
44
48
this.tokenCredential = tokenCredential;
45
49
this.context = newTokenRequestContext();
50
+
this.tokenBlockTimeout = Duration.ofMinutes(10);
46
51
}
47
52
48
53
/**
@@ -57,13 +62,27 @@ public TokenCredentialAuthProvider(@Nonnull final List<String> scopes, @Nonnull
57
62
this.context.setScopes(scopes);
58
63
}
59
64
65
+
/**
66
+
* Creates an Authentication provider using a TokenCredential and list of scopes
67
+
*
68
+
* @param tokenCredential Credential object inheriting the TokenCredential interface used to instantiate the Auth Provider
69
+
* @param scopes Specified desired scopes of the Auth Provider
70
+
* @param tokenObtentionTimeout Maximum time to wait for token obtention. Default 10 minutes. Use lower value on application with stable connectivity and no user interactions.
71
+
* @throws AuthenticationException exception occurs if the TokenCredential parameter is null
0 commit comments