Skip to content

7.0.0

Choose a tag to compare

@damieng damieng released this 29 Sep 08:44
· 698 commits to master since this release
cf90e06

There are many breaking changes in this release. Please see our Migration Guide for v7.

The summary of changes is:

  • Authentication SDK includes new ID Token Validation. If your application uses HS256 signing you should set either SigningAlgorithm to SigningAlgorithm.HS256 on requests you make to AuthenticationApiClient or switch to RS256 if your application is not confidential.

  • Improved testing and mocking support. You can now mock IAuthenticationConnection / IManagementConnection classes to provide local unit-testing functionality for AuthenticationApiClient and ManagementApiClient respectively.

  • Many classes moved namespace and assembly primarily ones in Core that were around paging. Visual Studio should be able to suggest where classes you were using now reside.

  • Disposal is now consistent. If AuthenticationApiClient or ManagementApiClient create a connection for you they will manage its lifecycle. If you pass in a connection then it will be your responsibility to manage it. This also applies to how HttpClientAuthenticationConnection and HttpClientManagementConnection will only dispose of a HttpClient they create and not ones they are given.

  • Rate Limiting information is now only available on the RateLimitApiException which is raised when the rate limit is exceeded.

  • ApiException is now ErrorApiException. If you use the status code or error message on exception you will need to switch to catching the later. The former is now a base class that does not have this information but ensures any old catch ApiException will continue to catch rate limit exceptions which also now inherit from this class.

  • Microsoft recommends HttpClient is reused as much as possible. Therefore you should use dependency injection or inversion of control to ensure that either a single instance of AuthenticationApiClient / ManagementApiClient or its connections HttpClientXConnection are created to ensure sharing. These classes are now thread-safe. You can additionally share HttpClient objects between them if you wish by injecting it into the HttpClientXConnection constructor.

  • Connections now have DisplayName, Realms and IsDomainConnection properties.