Hi everyone!
I've have just a (maybe noob) question. I'm implementing Oauth2 by using this guide -> https://ktor.io/quickstart/guides/oauth.html and looks like everything is working fine, I can see the token but... the question is, how can I indicate that requests need the auth? Right now my config is something like this:
Copy code
routing {
authenticate(OauthConfig.NAME) {
route("/test") {
get { call.respond("Sample from auth part...") }
}
}
}
When I call this WS, I set the access token into the auth header (Bearer) with postman but I get 401, if I do the request from browser, I always get a redirection to the login and it generates new token 😞