Hi all I have written a REST API in Ktor and would...
# ktor
z
Hi all I have written a REST API in Ktor and would like secure it with Keycloak. All the examples of the website https://github.com/ktorio/ktor-samples/blob/1.3.0/feature/auth/src/io/ktor/samples/auth/OAuthLoginApplication.kt does not base on REST API. My question is, how can I secure my REST API with https://ktor.io/servers/features/authentication/oauth.html. Thanks
m
You just have to wrap your protected endpoints with
Copy code
authenticate { }
where they send html, you send json