Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release version 8.0.0 #88

Merged
merged 11 commits into from
Jun 18, 2024
Merged

Release version 8.0.0 #88

merged 11 commits into from
Jun 18, 2024

Conversation

Colin-b
Copy link
Owner

@Colin-b Colin-b commented Jun 18, 2024

Added

  • Adding explicit support for Python 3.12.
  • Publicly expose requests_auth.SupportMultiAuth, allowing multiple authentication support for every requests authentication class that exists.
  • Publicly expose requests_auth.TokenMemoryCache, allowing to create custom Oauth2 token cache based on this default implementation.
  • You can now provide your own HTML success (success_html) and failure (failure_html) display via the new OAuth2.display shared setting. Refer to documentation for more details.
  • Thanks to the new redirect_uri_domain parameter on Authorization code (with and without PKCE) and Implicit flows, you can now provide the FQDN to use in the redirect_uri when localhost (the default) is not allowed.
  • requests_auth.WakaTimeAuthorizationCode handling access to the WakaTime API.

Changed

  • Except for requests_auth.testing, only direct access via requests_auth. was considered publicly exposed. This is now explicit, as inner packages are now using private prefix (_).
    If you were relying on some classes or functions that are now internal, feel free to open an issue.
  • requests_auth.JsonTokenFileCache and requests_auth.TokenMemoryCache get_token method does not handle kwargs anymore, the on_missing_token callable does not expect any arguments anymore.
  • requests_auth.JsonTokenFileCache does not expose tokens_path or last_save_time attributes anymore and is also allowing pathlib.Path instances as cache location.
  • requests_auth.TokenMemoryCache does not expose forbid_concurrent_cache_access or forbid_concurrent_missing_token_function_call attributes anymore.
  • Browser display settings have been moved to a shared setting, see documentation for more information on requests_auth.OAuth2.display.
    The failure page will be displayed for 10 seconds by default instead of 5 seconds previously.
    As a result the following classes no longer expose success_display_time and failure_display_time parameters.
    • requests_auth.OAuth2AuthorizationCode.
    • requests_auth.OktaAuthorizationCode.
    • requests_auth.WakaTimeAuthorizationCode.
    • requests_auth.OAuth2AuthorizationCodePKCE.
    • requests_auth.OktaAuthorizationCodePKCE.
    • requests_auth.OAuth2Implicit.
    • requests_auth.AzureActiveDirectoryImplicit.
    • requests_auth.AzureActiveDirectoryImplicitIdToken.
    • requests_auth.OktaImplicit.
    • requests_auth.OktaImplicitIdToken.
  • The authentication success and failure displayed in the browser were revamped to be more user-friendly. requests_auth.testing was modified to accommodate this change:
    • tab.assert_success expected_message parameter was removed.
    • tab.assert_failure expected_message parameter should not be prefixed with Unable to properly perform authentication: anymore and \n in the message should be replaced with <br>.
  • Exceptions issued by requests_auth are now inheriting from requests_auth.RequestsAuthException, itself inheriting from requests.RequestException, instead of Exception.

Fixed

  • Type information is now provided following PEP 561.
  • Remove deprecation warnings due to usage of utcnow and utcfromtimestamp.
  • requests_auth.OktaClientCredentials scope parameter is now mandatory and does not default to openid anymore.
  • requests_auth.OktaClientCredentials will now display a more user-friendly error message in case Okta instance is not provided.
  • Tokens cache DEBUG logs will not display tokens anymore.
  • Handle text/html; charset=utf-8 content-type in token responses.

Removed

  • Removing support for Python 3.7.
  • Deprecated requests_auth.Auths class has been removed.

@Colin-b Colin-b merged commit 1630f81 into master Jun 18, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant