oauth2 breaking changes

cargo

42 curated breaking changes across major versions of oauth2. Use this as a migration checklist before bumping dependencies.

42
changes
Breaking changes by transition
  • oauth2-reqwest-0.1.0-alpha.1 \u2192 oauth2-reqwest-0.1.0-alpha.2breaking

    Implement `From<reqwest::Client>` instead of `From<&reqwest::Client>` for `ReqwestClient` (and similar for `ReqwestBlockingClient`) to fix lifetime issues (the underlying `reqwest` clients are cheaply cloneable)

  • 5.0.0-alpha.3 \u2192 5.0.0-alpha.4breaking

    Replace `TokenResponse` generic with associated type (30ced325da24312c4e6b9d802adcb36a88594353)

  • 5.0.0-alpha.2 \u2192 5.0.0-alpha.3breaking

    Bump `http` to 1.0 and `reqwest` to 0.12 (408ecab500158145bf249e78a73a8010933bb0e2)

  • 5.0.0-alpha.2 \u2192 5.0.0-alpha.3breaking

    Return `impl Future` instead of `Pin<Box<dyn Future>>` to fix `Send`/`Sync` bounds (6e583bd03203e42ef712fc90edb57cf5a389f9b7)

  • 5.0.0-alpha.1 \u2192 5.0.0-alpha.2breaking

    Add conditional typestates (replacing Boolean typestates from 5.0.0-alpha.1) (85ea4700e1ad8a3efef7aa78660fd0056d9b46e6)

  • 5.0.0-alpha.1 \u2192 5.0.0-alpha.2breaking

    Consolidate HTTP client errors into `oauth2::HttpClientError` and flatten exports (e.g., `oauth2::reqwest` instead of `oauth2::reqwest::reqwest`) (4391eed01c26c3e9e9fd5a14d90f111a02636a4c)

  • 4.4.2 \u2192 5.0.0-alpha.1breaking

    Improve `Display` output of `RequestTokenError::ServerResponse` (96c6f9b17b5fdea98a6a7b84bec8e420671342eb)

  • 4.4.2 \u2192 5.0.0-alpha.1breaking

    reqwest: Migrate to shared `Error` type and use `thiserror`'s `From` impl by @MarijnS95 (#238)

  • 4.4.2 \u2192 5.0.0-alpha.1breaking

    Refactor crate into smaller private modules and make `devicecode` and `revocation` modules private (9d8f11addf819134f15c6d7f03276adb3d32e80b)

  • 4.4.2 \u2192 5.0.0-alpha.1breaking

    Track `Client` endpoints statically via typestates (1d1f4d17ecdf2a3feb565eb1789cc8649cac7705)

  • 4.4.2 \u2192 5.0.0-alpha.1breaking

    Bump MSRV to 1.65 and institute a policy supporting Rust releases going back at least 6 months (same policy as [`openidconnect`](https://github.com/ramosbugs/openidconnect-rs) crate) (576f8096914c7da82a5cd8c2253d47541697aa6a)

  • 5.0.0-rc.1 \u2192 5.0.0breaking

    Bump `http` to 1.0 and `reqwest` to 0.12 (408ecab500158145bf249e78a73a8010933bb0e2)

  • 5.0.0-rc.1 \u2192 5.0.0breaking

    Consolidate HTTP client errors into `oauth2::HttpClientError` and flatten exports (e.g., `oauth2::reqwest` instead of `oauth2::reqwest::reqwest`) (4391eed01c26c3e9e9fd5a14d90f111a02636a4c)

  • 5.0.0-rc.1 \u2192 5.0.0breaking

    Return `impl Future` instead of `Pin<Box<dyn Future>>` to fix `Send`/`Sync` bounds (6e583bd03203e42ef712fc90edb57cf5a389f9b7)

  • 5.0.0-rc.1 \u2192 5.0.0breaking

    Replace `TokenResponse` generic with associated type (30ced325da24312c4e6b9d802adcb36a88594353)

  • 5.0.0-rc.1 \u2192 5.0.0breaking

    Add conditional typestates (replacing Boolean typestates from 5.0.0-alpha.1) (85ea4700e1ad8a3efef7aa78660fd0056d9b46e6)

  • 4.0.0-alpha.6 \u2192 4.0.0-beta.1breaking

    Expose a `serde_path_to_error::Error<serde_json::Error>>` in the `RequestTokenError::Parse` variant instead of a `serde_json::Error`. This change should make JSON deserialization errors easier to diagnose.

  • 4.0.0-alpha.6 \u2192 4.0.0-beta.1breaking

    Add `rustls-tls` (default) and `native-tls` feature flags for use with `reqwest`. Previously, enabling the `reqwest` feature flag would always use `rustls`. The default behavior is unchanged, but users that disable the default features and wish to continue using `rustls` may wish to add the `rustls-tls` feature flag to their `Cargo.toml`.

  • 4.0.0-alpha.5 \u2192 4.0.0-alpha.6breaking

    `set_revocation_url` -> `set_revocation_uri`

  • 4.0.0-alpha.5 \u2192 4.0.0-alpha.6breaking

    Fix URI/URL naming inconsistencies (#128). For context, see ramosbugs/openidconnect-rs#39.

  • 4.0.0-alpha.5 \u2192 4.0.0-alpha.6breaking

    `set_introspection_url` -> `set_introspection_uri`

  • 4.0.0-alpha.5 \u2192 4.0.0-alpha.6breaking

    `set_redirect_url` -> `set_redirect_uri`

  • 4.0.0-alpha.4 \u2192 4.0.0-alpha.5breaking

    Have `Client::exchange_device_code`, `Client::introspect`, and `Client::revoke_token` fail fast with a new `ConfigurationError` enum when the relevant OAuth2 endpoint hasn't been configured by calling `set_device_authorization_url`, `set_introspection_url`, or `set_revocation_url`, respectively. Previously, an error would not be returned until a call to `request`/`request_async` (#127).

  • 4.0.0-alpha.3 \u2192 4.0.0-alpha.4breaking

    Fix inconsistent naming of types related to [RFC 7662 Token Introspection](https://tools.ietf.org/html/rfc7662) (fdab6401aedf3ad4bbd68d2522516b2a8cc78695/#123). This renames the following:

  • 4.0.0-alpha.3 \u2192 4.0.0-alpha.4breaking

    `introspect_url` to `introspection_url`.

  • 4.0.0-alpha.3 \u2192 4.0.0-alpha.4breaking

    `IntrospectUrl` to `IntrospectionUrl`

  • 4.0.0-alpha.3 \u2192 4.0.0-alpha.4breaking

    `*TokenInspectionResponse` to `*TokenIntrospectionResponse`

  • 4.0.0-alpha.3 \u2192 4.0.0-alpha.4breaking

    `IntrospectRequest` to `IntrospectionRequest`

  • 4.0.0-alpha.2 \u2192 4.0.0-alpha.3breaking

    Add `#[non_exhaustive]` attribute to `AuthType` to support non-breaking additions in the future

  • 4.0.0-alpha.2 \u2192 4.0.0-alpha.3breaking

    Raise minimum supported Rust version (MSRV) to 1.45

  • 4.0.0-alpha.2 \u2192 4.0.0-alpha.3breaking

    Upgrade `reqwest` to 0.11 and rename feature flag from `reqwest-010` to `reqwest`. This upgrades `tokio` to 1.0.

  • 3.0.0 \u2192 4.0.0-alpha.1breaking

    Eliminate `Async*` traits and move the `request_async` methods to the underlying `*Request` structs

  • 3.0.0 \u2192 4.0.0-alpha.1breaking

    Drop support for `reqwest` 0.9 (previously enabled via the `reqwest-09` feature flag); only the (default) `reqwest-010` feature flag is now supported

  • 3.0.0 \u2192 4.0.0-alpha.1breaking

    Raise minimum supported Rust version to 1.41

  • 3.0.0 \u2192 4.0.0-alpha.1breaking

    Drop support for `futures` 0.1 and remove the `futures-01` and `futures-03` feature flags; only async/await is now supported (without requiring any feature flags)

  • 3.0.0 \u2192 4.0.0-alpha.1breaking

    Migrate public API from `http` 0.1 to 0.2

  • 4.0.0-beta.1 \u2192 4.0.0breaking

    Drop support for `futures` 0.1 and remove the `futures-01` and `futures-03` feature flags; only async/await and `futures` 0.3 are now supported (without requiring any feature flags).

  • 4.0.0-beta.1 \u2192 4.0.0breaking

    Raise minimum supported Rust version (MSRV) to 1.45.

  • 4.0.0-beta.1 \u2192 4.0.0breaking

    Upgrade `reqwest` to 0.11 and rename feature flag to `reqwest`. This upgrades `tokio` to 1.0 and removes support for both the `reqwest-010` and `reqwest-09` feature flags.

  • 4.0.0-beta.1 \u2192 4.0.0breaking

    Eliminate `Async*` traits and move the `request_async` methods to the underlying `*Request` structs

  • 4.0.0-beta.1 \u2192 4.0.0breaking

    Migrate public API from `http` 0.1 to 0.2.

  • 3.0.0-alpha.8 \u2192 3.0.0-alpha.9breaking

    Add `Extension` variants to `BasicTokenType` and `BasicErrorResponseType` enums

API access

Get this data programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/breaking/cargo/oauth2
oauth2 breaking changes — Cargo migration guide | DepScope