Repository navigation
7.0.0
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/IManagementConnectionclasses to provide local unit-testing functionality forAuthenticationApiClientandManagementApiClientrespectively. -
Many classes moved namespace and assembly primarily ones in
Corethat were around paging. Visual Studio should be able to suggest where classes you were using now reside. -
Disposal is now consistent. If
AuthenticationApiClientorManagementApiClientcreate 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 howHttpClientAuthenticationConnectionandHttpClientManagementConnectionwill only dispose of aHttpClientthey create and not ones they are given. -
Rate Limiting information is now only available on the
RateLimitApiExceptionwhich is raised when the rate limit is exceeded. -
ApiExceptionis nowErrorApiException. 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 catchApiExceptionwill continue to catch rate limit exceptions which also now inherit from this class. -
Microsoft recommends
HttpClientis reused as much as possible. Therefore you should use dependency injection or inversion of control to ensure that either a single instance ofAuthenticationApiClient/ManagementApiClientor its connectionsHttpClientXConnectionare created to ensure sharing. These classes are now thread-safe. You can additionally shareHttpClientobjects between them if you wish by injecting it into theHttpClientXConnectionconstructor. -
Connections now have DisplayName, Realms and IsDomainConnection properties.