Skip to content

Commit 90d2e5a

Browse files
authored
Merge pull request #1817 from microsoftgraph/feat/cae-control
feat/cae control
2 parents cee38d6 + c820bab commit 90d2e5a

File tree

3 files changed

+37
-4
lines changed

3 files changed

+37
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jacocoTestReport {
2626
}
2727

2828
jacoco {
29-
toolVersion = "0.8.10"
29+
toolVersion = "0.8.12"
3030
}
3131

3232
spotbugsMain {

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)