Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s-soroosh/playguard-module
https://github.com/s-soroosh/playguard-module
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/s-soroosh/playguard-module
- Owner: s-soroosh
- Created: 2013-11-05T12:15:18.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-11-10T14:45:38.000Z (almost 11 years ago)
- Last Synced: 2023-05-25T03:10:19.546Z (over 1 year ago)
- Language: Scala
- Size: 227 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Don't play with play! without PlayGuard!
=====================================PlayGuard is a simple Security Framework for Play webapplications (currently just for scala).
I would like to have an active and kind community for working on this project. There are many contribution points which you can evolve.
With using PlayGuard you can secure your actions with using com.github.playguard.action.SessionSecureAction instead of
play.api.mvc.Action.After using SessionSecureAction if the user is not authenticated yet, she will redirect to login page (currently a very simple page)
When she authenticated successfully then the user will redirect to the secured action.There is a PrincipalRepository interface which you can implement your own principal repostiry and set it in SecurityRegistry object.
Currently there are two implementationcom.github.playguard.repository.DefaultPrincipalRepositry:
A very simple Repostiry with static user and password. It is suitable just for testing your porject integration with PlayGuard module.
(This is a default repostiry in SecurityRegistry so don't forget to change it)com.github.playguard.repository.ConfigurationPrincipalRepository:
If your project has a limited and static users then you can use this implementation.
Just you need to define playGuard.repository in your application.conf then users can be authenticated with defined principals in application.confCurrently the playGuard.repositry has a strange format because I assume it is a string type ( not a list of objects )
so you need to declare your repostiry as the following sample:playGuard.Repository = "[{\"username\":\"user1\",\"password\":\"pass1\"},{\"username\":\"user2\",\"password\":\"pass2\"}]"
Currently if you want to use the last version in your project you can add following dependency to your application
dependencies in Build.scalaval appDependencies = Seq(
"sarabadani" %% "playguard-module" % "1.0-SNAPSHOT"
)Then add following resolver to your project resolvers:
play.Project(appName, appVersion, appDependencies).settings(
resolvers += Resolver.url("PlayGuard Repository", url("http://psycho-ir.github.com/PlayGuard/"))(Resolver.ivyStylePatterns))