https://kotlinlang.org logo
#ktor
Title
# ktor
l

lenqnr

06/24/2019, 9:00 AM
Does Ktor have is own method for JWT generation or Should I use another library like java-jwt?
d

Dennis Schröder

06/24/2019, 9:02 AM
l

lenqnr

06/24/2019, 9:18 AM
I thought that only contains authentication methods. It's quite confusing. I wonder if there are more detailed and beginner friendly documents.
d

Dennis Schröder

06/24/2019, 10:41 AM
If you google, you'll should find some tutorials about ktor and jwt.
👍 1
l

lenqnr

06/24/2019, 11:11 AM
I found some helpful materials but sadly not that many. Thank you.
k

Kenneth

06/25/2019, 8:57 PM
Did you figure this one out? Did you have to use additional libraries?
l

lenqnr

06/26/2019, 11:33 AM
No, you just need a dependency
implementation("io.ktor:ktor-auth-jwt:1.2.2")
. I found a sample project: https://github.com/AndreasVolkmann/ktor-auth-jwt-sample Check it out. Code size is small and JwtConfig.kt file in the repository is all you need. Thanks to Andreas Volkmann.
k

Kenneth

06/26/2019, 3:00 PM
Thanks for the reply!