Permalink
Browse files

Add an example user provider for the sample app

  • Loading branch information...
1 parent 56b610c commit 5479ca7d077b460bffee0f8263360f95bc5a0295 @bruntonspall bruntonspall committed Dec 7, 2012
@@ -34,6 +34,12 @@ object Properties {
}
class ScalaManagementFilter extends ManagementFilter {
+ val userProvider = new UserProvider {
+ // This is a very bad user provider, looking it up in a db or Properties would be better
+ // Note you can just check password or username, it's up to you
+ def isValid(credentials: UserCredentials) = credentials.username == credentials.password
+ val realm = "ScalaManagementFilter"
+ }
val applicationName = "Example Servlet API Application"
lazy val pages =
new DummyPage() ::

0 comments on commit 5479ca7

Please sign in to comment.