-
Notifications
You must be signed in to change notification settings - Fork 5
/
README
30 lines (24 loc) · 1.41 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
This module provides basic security for Play applications written in Scala.
==========================================================================================================
Installation:
==========================================================================================================
1. Extract the contents of /scalasecure/dist/scalasecure-0.1.zip into a local directory on the server.
2. 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:
==========================================================================================================
1. The controllers that need to be secure should have the Secure trait.
2. All methods that do not need to be secure should be annotated with @NonSecure
3. All methods that need special permissions should be annotated with @Authorize
4. 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.
5. The routes file should have the following route configured:
* / module:scalasecure