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

Upgrade to Ktor Server 3.0.1 #336

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

ulrikandersen
Copy link
Collaborator

This PR adapts the Ktor Controller Interface Generator to support Ktor Server 3.0.1.

Upgrading to Ktor Server 3.0.1 means letting go of the 'principal' parameter to the controller functions. The Principal interface is no longer available and thus we cannot provide a common supertype of the different Principals. Instead the user should get the principal with call.principal<P>() in the implementation. This will work just fine with Ktor 2.3.x too.

Upgrading to Ktor Server 3.0.1 means letting go of the 'principal' parameter to the controller functions. The [Principal interface](https://api.ktor.io/ktor-server/ktor-server-plugins/ktor-server-auth/io.ktor.server.auth/-principal/index.html) is no longer available and thus we cannot provide a common supertype of the different Principals. Instead the user should get the principal with `call.principal<P>()` in the implementation.
Copy link
Owner

@cjbooms cjbooms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the delay on this Ulrik. Feel free to merge if you are happy, I am not an expert on Ktor. Just ping me if you want a new major release cut, I can have on ready in 30 minutes or so

@ulrikandersen
Copy link
Collaborator Author

Apologies for the delay on this Ulrik. Feel free to merge if you are happy, I am not an expert on Ktor. Just ping me if you want a new major release cut, I can have on ready in 30 minutes or so

No worries at all ✌️ I am not in a hurry to get a new major version out, but I will ping in case that changes. I am also working on a fix for kotlinx.serialization that could potentially be included in an upcoming major version release.

@ulrikandersen ulrikandersen merged commit b6d36d9 into cjbooms:master Nov 29, 2024
1 check passed
@ulrikandersen ulrikandersen deleted the ktor-server-3.0.1 branch November 29, 2024 14:44
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.

2 participants