Frédéric Nieto

Results 93 comments of Frédéric Nieto

https://github.com/papsign/KtorOAuthServer/tree/master Example usage coming soon.

https://github.com/papsign/KtorOAuthServer/tree/master/src/test/kotlin/com/papsign/oauth2/example You need to implement the same functionality yourself, and preferably with database access. If you use Exposed, you may need to implement the `requestWrapper` parameters with a database transaction...

have you got it to work ?

The OAuth2 spec is a real mess, the configuration you need here is simply to set up the persistence and login validation. Most of the work is done, the only...

Alright, JWT is usually the easiest way to handle the state of the session because you don't need an underlying persistence layer, and a lot of libraries already exist. You...

no convenient implementation exists. you need to implement it yourself by implementing `AuthProvider` and creating a route selector that registers it: ```kotlin inline fun NormalOpenAPIRoute.auth(privider: AuthProvider, crossinline route: OpenAPIAuthenticatedRoute.()->Unit =...

maybe you need to inherit the route provider as well like this: ```kotlin OpenAPIAuthenticatedRoute(this.ktorRoute.authenticate(authName) {}, this.provider.child(), this).throws( APIException.apiException(HttpStatusCode.Unauthorized) ) ``` Or use a named authenication. you could also change `.apply...

Ah wait: you used `route.ktorroute` instead of `this.ktorroute`

Not to my knowledge

I have it setup like this: ``` kotlin class OAuth2Provider(scopes: List) : AuthProvider { override suspend fun getAuth(pipeline: PipelineContext): A = [email protected](pipeline.call.principal()!!) override fun apply(route: NormalOpenAPIRoute): OpenAPIAuthenticatedRoute = OpenAPIAuthenticatedRoute(route.ktorRoute.authenticate(authName) {},...