From bf1e5a2aa4991b74da1d9be0702371f94c49b98f Mon Sep 17 00:00:00 2001 From: Tim Nelson Date: Tue, 1 Nov 2011 15:11:48 -0500 Subject: [PATCH] Moved README to markdown --- README.textile => README.markdown | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) rename README.textile => README.markdown (79%) diff --git a/README.textile b/README.markdown similarity index 79% rename from README.textile rename to README.markdown index 59e4c62..c0d19d9 100644 --- a/README.textile +++ b/README.markdown @@ -1,54 +1,54 @@ -h2. Lift MongoAuth Module +# Lift MongoAuth Module Authentication and Authorization module for Lift-MongoDB-Record. -h2. Creating a User Data Model +# Creating a User Data Model This module provides several traits for constructing a User model, which includes roles and permissions. There are several ways you can utilize this module: -*SimpleUser* +## SimpleUser _model.SimpleUser_ is a fully implemented user model, but is not extensible in any way. This is only useful for testing and demos. -*ProtoAuthUser* +## ProtoAuthUser _ProtoAuthUser_ and _ProtoAuthUserMeta_ are a pair of traits that can be used to build a user model class and meta object. _ProtoAuthUser_ has some standard fields. You can add fields to it, but you can't modify the ones provided. This is a good place to start. If you find you need to modify the provided fields, you can copy and paste them into your user class and use _MongoAuthUser_. -*MongoAuthUser* +## MongoAuthUser _MongoAuthUser_ is a trait for defining a MongoRecord of _AuthUser_ (provides authorization functionality). This can be used to build a user class from scratch. It only requires id and email fields. -*ProtoAuthUserMeta* +## ProtoAuthUserMeta _ProtoAuthUserMeta_ is a combination of _AuthUserMeta_ and _UserLifeCycle_ traits. These provide authorization functionality and login/logout functionality for MongoMetaRecord objects. No matter which version you use for the MongoRecord user class, you can use this trait to define your MongoMetaRecord, if it provides sufficient functionality. -h2. Roles and Permissions +## Roles and Permissions Permissions are defined using a simple case class. They have three parts; domain, actions, entities. This was heavily influenced by "Apache Shiro's":http://shiro.apache.org/ WildcardPermission. Please see the "JavaDoc for WildcardPermission":http://shiro.apache.org/static/current/apidocs/org/apache/shiro/authz/permission/WildcardPermission.html) for detailed information. -bc. val printer = Permission("printer") -assert(printer.implies(Permission.all) == true) -assert(printer.implies(Permission.none) == false) -assert(printer.implies(Permission("printer")) == true) -assert(printer.implies(Permission("a")) == false) + val printer = Permission("printer") + assert(printer.implies(Permission.all) == true) + assert(printer.implies(Permission.none) == false) + assert(printer.implies(Permission("printer")) == true) + assert(printer.implies(Permission("a")) == false) Role -h2. Sitemap LocParams +## Sitemap LocParams -h2. Acknowledgments +## Acknowledgments