Skip to content

v1.6.0

Latest
Compare
Choose a tag to compare
@guillp guillp released this 05 Sep 19:49
· 28 commits to main since this release
4962599

This release mostly focuses on polishing and does not introduce any major feature.
It comes with quite a few potentially breaking changes.
Next step will be to add support for DPoP.

BREAKING CHANGES

  • Removed the BearerAuth class. You can use a BearerToken directly as replacement.
  • parameter bearer_token_class to OAuth2Client is renamed to token_class, if a custom token class is used.
  • parameter url in ApiClient methods is now renamed to `path, since it only accepts a relative path. It was not meant to be used as kwargs anyway and is the 1st positional parameter, so chances are that it will not require any code change.
  • class TokenEndpointPoolingJob has been renamed to BaseTokenEndpointPoolingJob.
  • class ClientAssertionAuthenticationMethod has been renamed to BaseClientAssertionAuthenticationMethod.
  • renamed some exceptions:
    • MismatchingAcr to MismatchingIdTokenAcr
    • MismatchingAudience to MismatchingIdTokenAudience
    • MismatchingAzp to MismatchingIdTokenAzp
    • MismatchingIssuer to MismatchingIdTokenIssuer
    • MismatchingNonce to MismatchingIdTokenNonce
  • Most classes have been converted to attrs.frozen classes. This should not change their behaviors, but their attributes cannot be modified after creation anymore (which was unsupported anyway).
  • renamed GrantType enum to GrantTypes
  • renamed PkceUtils.code_verifier_re to code_verifier_pattern
  • expires_at is now rounded down to the exact second (with 0 microseconds)
  • expires_in is now rounded up to the next second

What Changed

  • enable ALL ruff rules, implement fixes
  • added authorization header class var in BearerToken, for #70
  • introduced many custom exceptions, with better error messages and context
  • introduced Endpoints, ResponseTypes and CodeChallengeMethods enums
  • convert client authentication handlers to attrs classes
  • convert requests auth handlers to attrs classes
  • dependencies updated
  • tests updated
  • reviewed some docstrings
  • tests now have 100% code coverage
  • BearerToken.validate_id_token() now accepts a leeway for the expiration date and the auth_time validation

Pull Requests

Full Changelog: v1.5.3...v1.6.0