Deadbolt 2 is an authorization library for Play 2, and features APIs for both Java- and Scala-based applications. It allows you to apply constraints to controller actions, and to customize template rendering based on the current user.
This repository contains the Java API for Deadbolt.
You can find documentation and examples for Deadbolt at https://deadbolt-java.readme.io/.
If you want to explore Deadbolt further, you might want to take a look at the book I'm currently writing on it. You can find it at https://leanpub.com/deadbolt-2.
The Scala version of Deadbolt can by found at https://github.com/schaloner/deadbolt-2-scala.