Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"inheritdoc",
"kiota"
],
"java.configuration.updateBuildConfiguration": "interactive"
"java.configuration.updateBuildConfiguration": "interactive",
"java.compile.nullAnalysis.mode": "automatic"
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

## [0.2.0] - 2023-01-17

### Changed

- Removed defaults specific to Microsoft Graph for Azure Identity authentication library.

## [0.1.2] - 2023-01-06

# Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,11 @@ public AzureIdentityAccessTokenProvider(@Nonnull final TokenCredential tokenCred

if(scopes == null) {
_scopes = new ArrayList<String>();
} else if(scopes.length == 0) {
_scopes = Arrays.asList(new String[] { "https://graph.microsoft.com/.default" });
} else {
_scopes = Arrays.asList(scopes);
}
if (allowedHosts == null || allowedHosts.length == 0) {
_hostValidator = new AllowedHostsValidator(new String[] { "graph.microsoft.com", "graph.microsoft.us", "dod-graph.microsoft.us", "graph.microsoft.de", "microsoftgraph.chinacloudapi.cn", "canary.graph.microsoft.com" });
_hostValidator = new AllowedHostsValidator();
} else {
_hostValidator = new AllowedHostsValidator(allowedHosts);
}
Expand Down Expand Up @@ -107,6 +105,9 @@ public CompletableFuture<String> getAuthorizationToken(@Nonnull final URI uri, @
span.setAttribute("com.microsoft.kiota.authentication.additional_claims_provided", decodedClaim != null && !decodedClaim.isEmpty());

final TokenRequestContext context = new TokenRequestContext();
if(_scopes.isEmpty()) {
_scopes.add(uri.getScheme() + "://" + uri.getHost() + "/.default");
}
context.setScopes(_scopes);
span.setAttribute("com.microsoft.kiota.authentication.scopes", String.join("|", _scopes));
if(decodedClaim != null && !decodedClaim.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public UserAgentHandlerOption() { }
@Nonnull
private String productName = "kiota-java";
@Nonnull
private String productVersion = "0.1.1";
private String productVersion = "0.2.0";
/**
* Gets the product name to be used in the user agent header
* @return the product name
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ org.gradle.caching=true

mavenGroupId = com.microsoft.kiota
mavenMajorVersion = 0
mavenMinorVersion = 1
mavenPatchVersion = 2
mavenMinorVersion = 2
mavenPatchVersion = 0
mavenArtifactSuffix =

#These values are used to run functional tests
Expand Down