Permalink
Browse files

Client certificate option for Jetty adapter

  • Loading branch information...
1 parent 0c519be commit ef38ef0f0922b6cd091cacd4d71b69ac7547db08 @weavejester weavejester committed Feb 25, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 ring-jetty-adapter/src/ring/adapter/jetty.clj
View
7 ring-jetty-adapter/src/ring/adapter/jetty.clj
@@ -32,6 +32,9 @@
(.setTruststore ssl-connector (options :truststore)))
(when (options :trust-password)
(.setTrustPassword ssl-connector (options :trust-password)))
+ (case (options :client-auth)
+ :need (.setNeedClientAuth ssl-connector true)
+ :want (.setWantClientAuth ssl-connector true))
(.addConnector server ssl-connector)))
(defn- create-server
@@ -61,7 +64,9 @@
:key-password - the password to the keystore
:truststore - a truststore to use for SSL connections
:trust-password - the password to the truststore
- :max-threads - the maximum number of threads to use (default 250)"
+ :max-threads - the maximum number of threads to use (default 250)
+ :client-auth - SSL client certificate authenticate, may be set to :need,
+ :want or :none (defaults to :none)"
[handler options]
(let [^Server s (create-server (dissoc options :configurator))]
(when-let [configurator (:configurator options)]

0 comments on commit ef38ef0

Please sign in to comment.