Skip to content

build(deps): bump oauth2 from 4.4.2 to 5.0.0 - #67

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/oauth2-5.0.0
Open

build(deps): bump oauth2 from 4.4.2 to 5.0.0#67
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/oauth2-5.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github May 25, 2026

Copy link
Copy Markdown
Contributor

Bumps oauth2 from 4.4.2 to 5.0.0.

Upgrade guide

Sourced from oauth2's upgrade guide.

Upgrade Guide

Upgrading from 4.x to 5.x

The 5.0 release includes breaking changes to address several long-standing API issues, along with a few minor improvements. Consider following the tips below to help ensure a smooth upgrade process.

Upgrade Rust to 1.71 or newer

The minimum supported Rust version (MSRV) is now 1.71. Going forward, this crate will maintain a policy of supporting Rust releases going back at least 6 months. Changes that break compatibility with Rust releases older than 6 months will no longer be considered SemVer breaking changes and will not result in a new major version number for this crate. MSRV changes will coincide with minor version updates and will not happen in patch releases.

Add typestate generic types to Client

Each auth flow depends on one or more server endpoints. For example, the authorization code flow depends on both an authorization endpoint and a token endpoint, while the client credentials flow only depends on a token endpoint. Previously, it was possible to instantiate a Client without a token endpoint and then attempt to use an auth flow that required a token endpoint, leading to errors at runtime. Also, the authorization endpoint was always required, even for auth flows that do not use it.

In the 5.0 release, all endpoints are optional. Typestates are used to statically track, at compile time, which endpoints' setters (e.g., set_auth_uri()) have been called. Auth flows that depend on an endpoint cannot be used without first calling the corresponding setter, which is enforced by the compiler's type checker. This guarantees that certain errors will not arise at runtime.

In addition to unconditional setters (e.g., set_auth_uri()), each endpoint has a corresponding conditional setter (e.g., set_auth_uri_option()) that sets a conditional typestate (EndpointMaybeSet). When the conditional typestate is set, endpoints can be used via fallible methods that return Err(ConfigurationError::MissingUrl(_)) if an endpoint has not been set. This is useful in dynamic scenarios such as OpenID Connect Discovery, in which it cannot be determined until runtime whether an endpoint is configured.

There are three possible typestates, each implementing the EndpointState trait:

  • EndpointNotSet: the corresponding endpoint has not been set and cannot be used.
  • EndpointSet: the corresponding endpoint has been set and is ready to be used.
  • EndpointMaybeSet: the corresponding endpoint may have been set and can be used via fallible methods that return Result<_, ConfigurationError>.

The following code changes are required to support the new interface:

  1. Update calls to Client::new() to use the single-argument constructor (which accepts only a ClientId). Use the set_auth_uri(), set_token_uri(), and set_client_secret() methods to set the authorization endpoint,

... (truncated)

Commits
  • f3424b4 Update Cargo-1.65.lock
  • 61ec227 Bump version to 5.0.0
  • 9a2b746 Improve HttpClientError::Reqwest error message
  • 2492d69 Bump version to 5.0.0-rc.1
  • c599c12 Use --locked on MSRV build in CI
  • 03cb079 Remove client secret from implicit flow example
  • 9c41286 Update dev dependencies (#285)
  • c74aec9 Remove sponsorship from README
  • 459811d Accept null device code interval
  • 5b2ab88 Ignore token revocation response body
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [oauth2](https://github.com/ramosbugs/oauth2-rs) from 4.4.2 to 5.0.0.
- [Release notes](https://github.com/ramosbugs/oauth2-rs/releases)
- [Upgrade guide](https://github.com/ramosbugs/oauth2-rs/blob/main/UPGRADE.md)
- [Commits](ramosbugs/oauth2-rs@4.4.2...5.0.0)

---
updated-dependencies:
- dependency-name: oauth2
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants