Liking cljdoc? Tell your friends :D

Dropwizard Primer Bundle Build Status

This bundle adds Primer JWT service support for dropwizard. This bundle compiles only on Java 8+.



The bundle adds Primer JWT service support for dropwizard. This makes it easier to secure the your API with JWT and a robust claims negotiation. Tokens can be either static (no expiry) or dynamic with expiry. As a added bonus; it supports declarative role based authorizations

Build instructions

  • Clone the source:

    git clone
  • Build

    mvn install

Maven Dependency

Use the following repository:

    <name>Clojars repository</name>

Use the following maven dependency:


Using Primer bundle


    public void initialize(final Bootstrap...) {
        bootstrap.addBundle(new PrimerBundle() {
            public PrimerBundleConfiguration getPrimerConfiguration() {
            public Set<String> withWhiteList(T configuration) {
            public PrimerAuthorizationMatrix withAuthorization(T configuration) {


  enabled: true
    CONFIG: true
    ANNOTATION: true
  absentTokenStatus: BAD_REQUEST
    type: simple
    host: my.primer.somewhere
    port: 8080
  cacheExpiry: 600
  cacheMaxSize: 100000
  clockSkew: 60
  prefix: Bearer
  privateKey: thisismynotsosecretkey 
    - unprotected/url
    - unprotected/url/{with}/{path}/{param}
    - type: dynamic #can be static, dynamic or auto (uses token to infer the type of auth)
        - GET
        - user
      url: protected/user/{do}/{some}/{stuff}
    - type: static
        - POST
        - admin
      url: protected/admin/{do}/{admin}/{stuff}  


Copyright 2016 Phaneesh Nagaraja

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Can you improve this documentation? These fine people already did:
phaneesh, Phaneesh N & Pavan.JS
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close