Skip to content

Commit a202619

Browse files
committed
feat: adds a parameter for isCAE enabled in authentication provider
fix: replaces invalid inherited doc comments for access token provider Signed-off-by: Vincent Biret <[email protected]>
1 parent cee38d6 commit a202619

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

src/main/java/com/microsoft/graph/core/authentication/AzureIdentityAccessTokenProvider.java

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,31 @@ public class AzureIdentityAccessTokenProvider extends com.microsoft.kiota.authen
1717
public AzureIdentityAccessTokenProvider(@Nonnull TokenCredential tokenCredential) {
1818
this(tokenCredential, new String[] {}, null);
1919
}
20-
/** {@inheritDoc} */
20+
/**
21+
* Creates a new instance of AzureIdentityAccessTokenProvider.
22+
* @param tokenCredential The Azure.Identity.TokenCredential implementation to use.
23+
* @param allowedHosts The list of allowed hosts for which to request access tokens.
24+
* @param scopes The scopes to request access tokens for.
25+
* @param observabilityOptions The observability options to use.
26+
*/
2127
@SuppressWarnings("LambdaLast")
2228
public AzureIdentityAccessTokenProvider(@Nonnull final TokenCredential tokenCredential, @Nonnull final String[] allowedHosts,
2329
@Nullable final ObservabilityOptions observabilityOptions, @Nonnull final String... scopes) {
24-
super(tokenCredential, allowedHosts, observabilityOptions, scopes);
30+
this(tokenCredential, allowedHosts, observabilityOptions, true, scopes);
31+
}
32+
33+
/**
34+
* Creates a new instance of AzureIdentityAccessTokenProvider.
35+
* @param tokenCredential The Azure.Identity.TokenCredential implementation to use.
36+
* @param allowedHosts The list of allowed hosts for which to request access tokens.
37+
* @param scopes The scopes to request access tokens for.
38+
* @param observabilityOptions The observability options to use.
39+
* @param isCaeEnabled Whether to enable Continuous Access Evaluation, defaults to true.
40+
*/
41+
@SuppressWarnings("LambdaLast")
42+
public AzureIdentityAccessTokenProvider(@Nonnull final TokenCredential tokenCredential, @Nonnull final String[] allowedHosts,
43+
@Nullable final ObservabilityOptions observabilityOptions, final boolean isCaeEnabled, @Nonnull final String... scopes) {
44+
super(tokenCredential, allowedHosts, observabilityOptions, isCaeEnabled, scopes);
2545
if (allowedHosts == null || allowedHosts.length == 0) {
2646
final HashSet<String> allowedHostsSet = new HashSet<String>();
2747
allowedHostsSet.add("graph.microsoft.com");

src/main/java/com/microsoft/graph/core/authentication/AzureIdentityAuthenticationProvider.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ public AzureIdentityAuthenticationProvider(@Nonnull final TokenCredential tokenC
2727
*/
2828
@SuppressWarnings("LambdaLast")
2929
public AzureIdentityAuthenticationProvider(@Nonnull final TokenCredential tokenCredential, @Nonnull final String[] allowedHosts, @Nullable final ObservabilityOptions observabilityOptions, @Nonnull final String... scopes) {
30-
super(new AzureIdentityAccessTokenProvider(tokenCredential, allowedHosts, observabilityOptions, scopes));
30+
this(tokenCredential, allowedHosts, observabilityOptions, true, scopes);
31+
}
32+
33+
/**
34+
* Creates a new instance of AzureIdentityAuthenticationProvider.
35+
* @param tokenCredential The Azure.Identity.TokenCredential implementation to use.
36+
* @param allowedHosts The list of allowed hosts for which to request access tokens.
37+
* @param observabilityOptions The observability options to use.
38+
* @param isCaeEnabled Whether to enable Continuous Access Evaluation, defaults to true.
39+
* @param scopes The scopes to request access tokens for.
40+
*/
41+
@SuppressWarnings("LambdaLast")
42+
public AzureIdentityAuthenticationProvider(@Nonnull final TokenCredential tokenCredential, @Nonnull final String[] allowedHosts, @Nullable final ObservabilityOptions observabilityOptions, final boolean isCaeEnabled, @Nonnull final String... scopes) {
43+
super(new AzureIdentityAccessTokenProvider(tokenCredential, allowedHosts, observabilityOptions, isCaeEnabled, scopes));
3144
}
3245
}

0 commit comments

Comments
 (0)