the default jetty implementation will not give you...
# http4k
d
the default jetty implementation will not give you access to the certificates. If you really "need" the cert inside your app (rather than just rejecting requests without it), then I suggest using an RequestContext. OTOH, if you just want to reject, you can write a custom Jetty Handler which will do it and just handle it in that layer
c
So the idea is I only want to accept requests that are signed by a specific certificates provider.
I should do this in a Jetty handler?
Any examples on how to write a custom Jetty handler?
d
Looking at it, we would do this in Jetty using a standard Servlet so try searching for that (I've never done it personally so can't help). Here's the way in which we do it in the lib: https://github.com/http4k/http4k/blob/master/http4k-core/src/main/kotlin/org/http4k/servlet/servlet.kt
c
Thank you David
I have managed to find a way
d
­čĹŹ
c
Copy code
val handlerCollection = HandlerCollection()
handlerCollection.addHandler(HelloHandler())
handlerCollection.addHandler(httpHandler?.toJettyHandler())
Thanks for your help and sorry for bothering you so much.
d
@Cosmin Victor Celea it's absolutely fine - it's what we're here for (whenever we're not busy scavanging for food in the local plague-ridden wasteland outside ­čÖé )