Getting started with Deadbolt

Before we get started, it's important to note that v2.4.4 has a slightly different API to v2.4.3 due to the addition of AuthenticatedRequests. This breaking change was introduced to easier access to the subject, at the request of many people. If you're using an earlier version of the Deadbolt 2.4 series, please refer to the v2.4.3 documentation.

To use Deadbolt in your Play project, you will need to import the following library in build.sbt.

libraryDependencies ++= Seq(
  "be.objectify" %% "deadbolt-scala" % "2.5.1"
)

If you're already running your app in activator, don't forgot to reload the project.

Once this is done, you can enable the Deadbolt module in conf/application.conf.

play {
  modules {
    enabled += be.objectify.deadbolt.scala.DeadboltModule
  }
}