-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
BasicAuth is not resolved as a valid import in 1.2.0 #1133
Comments
Can confirm, although I used Gradle. Started with a generated projet through the IntelliJ plugin, and only have seen afterwards that it did not support 1.2.0, did the upgrade manually. Workd with 1.1.4, does not with 1.2.0. |
According to updated docs there is a new way for basic auth on client: val client = HttpClient() {
install(Auth) {
basic {
username = "username"
password = "password"
}
}
} But at least for maven based build it does not resolve
|
Looks like there is nothing, but metadata files in jar archive and documentation for maven projects is misleading. To make it work, dependency name should be adjusted with suffix <dependency>
<groupId>io.ktor</groupId>
<artifactId>ktor-client-auth-jvm</artifactId>
<version>${ktor.version}</version>
</dependency> Or basic auth <dependency>
<groupId>io.ktor</groupId>
<artifactId>ktor-client-auth-basic-jvm</artifactId>
<version>${ktor.version}</version>
</dependency> |
Hi @nilsmagnus. Thanks for the report. As mentioned above, the feature There is no metadata for JVM artifacts for now, and the artifact |
Awesome :) |
@nilsmagnus This issue should not be closed. Documentation and project generator are both producing the old, wrong version. |
Thanks for the notice. We'll update the docs and generator. |
This is still broken. |
gradle/kotlin-dsl-samples#1117 I know this is unrelated but, cmon guys, its been almost two years and KT and friends just feel like so much hot garbage in practice, unstable, can't build, project generators have showstopping bugs in them, IntelliJ seems to like to crash, on top of that the whole Gradle ecosystem is a mess to debug?? You've had this bug for 2 months, it can't have been that hard to fix (for anyone who knows this system they've constructed). What happened, did all the funding dry up or something? Or is this just incredibly unstable that two patch versions broke this again? |
Hi @smaudet, I can't reproduce the problem. What do you mean by still broken? |
@e5l , it means that the example in the docs (https://ktor.io/clients/http-client/features/auth.html) is not working. The dependency stated there is not resolved. |
Could you try?
|
Yes, I could try that. But the documentation states
|
For me neither ktor-client-auth nor ktor-client-auth-jvm work for me. I don't know how people are authenticating requests with ktor. |
Has ktor been abandoned? To a brand-new user, seems like some very basic stuff is wrong. I just tried to use the intellij plugin and the code it produces doesn't even compile due to this problem. |
@nilsmagnus, the documentation was fixed here: https://ktor.io/clients/http-client/features/auth.html |
The docs are fixed here: https://ktor.io/clients/http-client/features/auth.html. The plugin is fixed in Guys, great thanks for the investigation! |
Guys, with such a bad documentation - no one will be using ktor. Please include at least dependencies and corresponding imports in code snippets with examples. |
We're working on it. Thanks. |
awful documentation awful!!!! work on it please! |
Ktor Version
1.2.0
Ktor Engine Used(client or server and name)
Ktor-engine: Netty, httpclient: Apache
JVM Version, Operating System and Relevant Context
java: 11.0.2-open
OS: linux, ubuntu
build-system: maven
Feedback
After upgrade to version 1.2.0 from verison 1.1.4, the BasicAuth class fails to resolve: 'import io.ktor.client.features.auth.basic.BasicAuth' does not work.
Error:
Sample application with Main.kt and pom.xml below:
src/main/kotlin/Main.kt:
Maven file:
The text was updated successfully, but these errors were encountered: