Skip to content

Latest commit

 

History

History
2 lines (2 loc) · 566 Bytes

08-deadbolt-scala-hooks.markdown

File metadata and controls

2 lines (2 loc) · 566 Bytes

Using Deadbolt 2 with Play 2 Scala projects

Here's a curious fact. Deadbolt 2 Scala has equivalent capabilities to Deadbolt 2 Java, but with less code and fewer actions. Specifically, there are the same number of template tags, but quite a few fewer actions. Play 2 for Scala uses action composition in place of annotation-driven interceptors, and so there are no controller-level constraints. As a result, there is no need for the equivalents of @DeadboltDeferred, @BeforeAccess or @Unrestricted. These represent 33% of the interceptors of D2 Java.