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

Revert RoutingContext#user() returning UserContext to User #2689

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

vietj
Copy link
Contributor

@vietj vietj commented Dec 16, 2024

Motivation:

RoutingContext#user() method returns the io.vertx.ext.auth.User interface in Vert.x 4.x, its return type has been change to UserContext instead (in addition of other changes), as UserContext is the preferred API for interacting with the user and the User interface actually represents the User.

However, there is nothing wrong with having the user method returns the io.vertx.ext.auth.User interface, since the User interface is still the API for accessing user informations. The UserContext API can be returned from a userContext method instead. This avoids breaking the contract of the user method between 4.x and 5.0

Changes:

Introduce a new userContext method returning the UserContext and change the return type of the user method to return the User type.

@vietj vietj added this to the 5.0.0 milestone Dec 16, 2024
Motivation:

RoutingContext#user() method returns the io.vertx.ext.auth.User interface in Vert.x 4.x, its return type has been change to UserContext instead (in addition of other changes), as UserContext is the preferred API for interacting with the user and the User interface actually represents the User.

However, there is nothing wrong with having the user method returns the io.vertx.ext.auth.User interface, since the User interface is still the API for accessing user informations. The UserContext API can be returned from a userContext method instead. This avoids breaking the contract of the user method between 4.x and 5.0

Changes:

Introduce a new userContext method returning the UserContext and change the return type of the user method to return the User type.
@vietj vietj force-pushed the reinstate-routing-context-user branch from 632445b to 70f8343 Compare December 16, 2024 08:46
@vietj vietj self-assigned this Dec 16, 2024
@vietj vietj merged commit 0a830cf into master Dec 16, 2024
7 checks passed
@vietj vietj deleted the reinstate-routing-context-user branch December 16, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant