Join Slack
Powered by
Hi all I have written a REST API in Ktor and would...
# ktor
z
zero_coding
09/03/2020, 7:10 PM
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
Mathias Rørvik
09/04/2020, 1:36 PM
You just have to wrap your protected endpoints with
Copy code
authenticate { }
where they send html, you send json
14
Views
Open in Slack
Previous
Next