Skip to content

v0.4.0

Latest

Choose a tag to compare

@danschultzer danschultzer released this 07 Nov 21:49
· 12 commits to main since this release

Now requires Elixir 1.18 / OTP 26. #210

Breaking changes

  • Assent.HTTPAdapter.Finch removed #198
  • JSON is now the default JSON library #210
  • Assent.Strategy.Instagram removed because the Instagram Basic Display API has been discontinued #216
  • Exceptions and Assent.HTTPAdapter.HTTPResponse now omit potentially sensitive fields from their default Inspect output #217
  • Assent.Strategy.OIDC now requires :userinfo_signed_response_alg for signed UserInfo responses #217
  • The following exceptions have been renamed: #217
    • Assent.CallbackError to Assent.Strategy.CallbackError, now with :params field instead of :error and :error_uri
    • Assent.CallbackCSRFError to Assent.Strategy.CallbackCSRFError
    • Assent.CastClaimsError to Assent.Strategy.CastError
    • Assent.RequestError to Assent.HTTPAdapter.RequestError
    • Assent.InvalidResponseError to Assent.HTTPAdapter.InvalidResponseError
    • Assent.UnexpectedResponseError to Assent.HTTPAdapter.UnexpectedResponseError
    • Assent.ServerUnreachableError to Assent.HTTPAdapter.ServerUnreachableError
  • Strategies now return exceptions instead of error strings: Assent.MissingParamError for missing parameters and ArgumentError for configuration errors #217
  • Assent.Strategy.OAuth2 now returns Assent.Strategy.OAuth2.UnsupportedTokenTypeError for unsupported token types #217
  • Assent.Strategy.OIDC now returns: #217
    • Assent.Strategy.OIDC.InvalidOpenIDConfigurationError for invalid provider configuration
    • Assent.Strategy.OIDC.InvalidIDTokenError for invalid ID Tokens
    • Assent.Strategy.OIDC.InvalidUserInfoError for invalid UserInfo responses
  • Assent.Strategy.Telegram now returns ArgumentError for an invalid :authorization_channel #217
  • Assent.HTTPAdapter.HTTPResponse replaces its :request_url field with a :request field containing an Assent.HTTPAdapter.HTTPRequest struct #217
  • Assent.JWTAdapter.AssentJWT.Error replaces its :message field with structured :action, :part, and :reason fields #217
  • Assent.HTTPAdapter.Httpc now verifies SSL certificates with the OS trust store and OTP's built-in hostname verification, :certifi and :ssl_verify_fun are no longer used #219 (thanks @richard-ash)
  • Assent.HTTPAdapter.Httpc now raises ArgumentError on HTTPS requests configured with verify: :verify_none #219 (thanks @richard-ash)
  • Assent.HTTPAdapter.Httpc and Assent.HTTPAdapter.Req no longer follow redirects by default #222 (thanks @richard-ash)

Changes

  • :inets and :ssl are now started automatically by Assent, and no longer required in :extra_applications #218 #198 (thanks @richard-ash)
  • Assent.JWTAdapter.AssentJWT now supports EdDSA algorithms #200 (thanks @krallowski)
  • Assent.JWTAdapter.AssentJWT now supports EC JWKs #200
  • Assent.Strategy.OIDC no longer rejects a :client_authentication_method missing from the provider's token_endpoint_auth_methods_supported #184 (thanks @m0rt3nlund)
  • Assent.Strategy.OIDC accepts additional ID Token issuers via the :trusted_issuers config option #203 (thanks @tgodniak)
  • Assent.Strategy.OIDC now validates iss and aud for signed UserInfo responses #217
  • Assent.Strategy.Facebook now requests the user picture field #204 (thanks @simonxuhao)
  • Strategies now accept a :prepare_http_request configuration option for rewriting HTTP requests #206 (thanks @dragonhunt02)
  • Assent.HTTPAdapter.request/5 is deprecated in favor of Assent.HTTPAdapter.request/2 #206
  • Assent.Strategy.Apple now returns is_private_email, real_user_status, and org_id in the user info #208
  • Assent.Strategy.cast_claims/2 was added to support casting provider-specific claims #208
  • Assent.Strategy.OAuth2.grant_access_token/3 accepts :jwt_audience for JWT client authentication #215
  • Assent.Strategy.OAuth2 deprecates the :auth_method configuration option in favor of :client_authentication_method #221
  • Assent.Strategy.OIDC deprecates string values for the :client_authentication_method configuration option in favor of atoms #221 (thanks @richard-ash)

Bug fixes

  • Assent.Strategy.OAuth no longer lowercases the request path for signature base string, per RFC 5849 3.4.1.2 #201
  • Assent.HTTPAdapter.Req now returns the response headers instead of the request headers #202
  • Assent.Strategy.OIDC now rejects dynamically fetched OpenID configuration when issuer does not match the issuer URL #209
  • Assent.Strategy.OAuth2.callback/2 now validates the state parameter before handling error responses #211
  • Assent.Strategy.OIDC.authorize_url/1 now generates a random nonce when :nonce is set to true #212
  • Assent.Strategy.OAuth.authorize_url/1 now validates oauth_callback_confirmed in request token responses #213
  • Assent.Strategy.OAuth.callback/2 now validates the oauth_token parameter #213
  • Assent.Strategy.Telegram.callback/2 now verifies hash before verifying auth_date #214
  • Assent.Strategy.OAuth2.grant_access_token/3 now encodes client_secret_basic credentials as x-www-form-urlencoded #215
  • Assent.Strategy.OAuth2.grant_access_token/3 now uses the token endpoint URL as the default aud for JWT client authentication #215
  • Assent.Strategy.OAuth2.grant_access_token/3 now includes a unique jti in JWT client authentication #215
  • Assent.Strategy.Facebook now uses Graph API v26.0 #216
  • Assent.Strategy.VK now uses API v5.199 and only requests supported user fields #216
  • Assent.Strategy.VK now merges :user_url_params with the default fields and v request params instead of dropping them #220 (thanks @richard-ash)
  • Assent.Strategy.Discord now uses the API v10 endpoints #216
  • Assent.Strategy.Bitbucket and Assent.Strategy.Spotify now use client_secret_basic authentication #216
  • Assent.Strategy.LINE now uses client_secret_post authentication #216
  • Assent.Strategy.Apple no longer allows unverified user callback parameters to override identity claims #207