Play-ScalaSecure
Play-ScalaSecure copied to clipboard
This module provides basic security for Play applications written in Scala.
========================================================================================================== Installation:
- Extract the contents of /scalasecure/dist/scalasecure-0.1.zip into a local directory on the server.
- Add the following to dependencies.yml
- customModules -> scalasecure
repositories: - playCustomModules: type: local artifact: "/full/path/to/scalasecure/directory" contains: - customModules -> * 3. Run "play deps" on the project
That's it!
========================================================================================================== Usage:
- The controllers that need to be secure should have the Secure trait.
- All methods that do not need to be secure should be annotated with @NonSecure
- All methods that need special permissions should be annotated with @Authorize
- All permissions that should be applied to each method of a controller (except those marked with @NonSecure) should be defined in @Authorize annotated on the controller object.
- The routes file should have the following route configured:
-
/ module:scalasecure