[docs] docs - heins modified icdatabase.sdf

docs@interchange.redhat.com docs@interchange.redhat.com
Sun Jun 23 11:08:02 2002


User:      heins
Date:      2002-06-23 15:07:01 GMT
Modified:  .        icdatabase.sdf
Log:
	* Add documentation for indirect_login of [userdb ...].

Revision  Changes    Path
1.45      +45 -23    docs/icdatabase.sdf


rev 1.45, prev_rev 1.44
Index: icdatabase.sdf
===================================================================
RCS file: /anon_cvs/repository/docs/icdatabase.sdf,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- icdatabase.sdf	23 Jun 2002 01:21:28 -0000	1.44
+++ icdatabase.sdf	23 Jun 2002 15:07:01 -0000	1.45
@@ -1,10 +1,10 @@
 !init OPT_LOOK="akopia"; OPT_STYLE="manual"
-# $Id: icdatabase.sdf,v 1.44 2002/06/23 01:21:28 jon Exp $
+# $Id: icdatabase.sdf,v 1.45 2002/06/23 15:07:01 mheins Exp $
 
 !define DOC_NAME "Interchange Databases"
 !define DOC_TYPE ""
 !define DOC_CODE "icdatabase"
-!define DOC_VERSION substr('$Revision: 1.44 $',11, -2)
+!define DOC_VERSION substr('$Revision: 1.45 $',11, -2)
 !define DOC_STATUS "Draft"
 !define DOC_PROJECT "Interchange"
 !define DOC_URL "http://interchange.redhat.com/doc/icdatabase.html"
@@ -2717,6 +2717,7 @@
  acl               Set field for simple access control storage (acl)
  file_acl          Set field for file access control storage (file_acl)
  db_acl            Set field for database access control storage (db_acl)
+ indirect_login    Log in field if different than real username ('')
 !endblock
 
 By default the system crypt() call will be used to compare the password. This is best for security, but the passwords in the user database will not be human readable.
@@ -2792,13 +2793,26 @@
 
 LI1: login
 
-.Active parameters: username, password, crypt, pass_field, ignore_case
+.Active parameters: username, password, crypt, pass_field, ignore_case, indirect_login
 
-.Log in to Interchange. By default, the username is contained in the form variable C<mv_username> and the password in C<mv_password>. If the login is successful, the session value C<username> (C<[data session username]>) will be set to the user name.
-
-.This will recall the values of all non-special fields in the user database and place them in their corresponding user form variables.
-
-.The C<CookieLogin> directive (catalog.cfg) allows users to save their username/password in a cookie. Expiration time is set by C<SaveExpire>, renewed every time they log in. To cause the cookie to be generated originally, the form variable C<mv_cookie_password> or C<mv_cookie_username> must be set in the login form. The former causes both username and password to be saved, the latter just the username.
+.Log in to Interchange. By default, the username is contained in the form
+variable C<mv_username> and the password in C<mv_password>. If the login
+is successful, the session value C<username> (C<[data session
+username]>) will be set to the user name. If C<indirect_login> is used,
+it should be set to a field name which can be used as a lookup for the
+real username. This also causes a C<new_account> operation to create a
+user account based on an assigned username, and C<assign_username>
+should always be set when using indirect login.
+
+.This will recall the values of all non-special fields in the user
+database and place them in their corresponding user form variables.
+
+.The C<CookieLogin> directive (catalog.cfg) allows users to save their
+username/password in a cookie. Expiration time is set by C<SaveExpire>,
+renewed every time they log in. To cause the cookie to be generated
+originally, the form variable C<mv_cookie_password> or
+C<mv_cookie_username> must be set in the login form. The former causes
+both username and password to be saved, the latter just the username.
 
 LI1: logout
 
@@ -2806,13 +2820,21 @@
 
 LI1: new_account
 
-.Active parameters: username, password, verify, assign_username, username_mask, ignore_case
+.Active parameters: username, password, verify, assign_username, username_mask, ignore_case,indirect_login
 
 .Create a new account. It requires the C<username>, C<password>, and C<verify> parameters, which are by default contained in the form variables C<mv_username>, C<mv_password>, C<mv_verify> respectively.
 
 .If the C<assign_username> parameter is set, C<UserDB> will assign a sequential username. The C<counter> parameter can be used to set the filename (must be absolute), or the default of CATALOG_DIR/etc/username.counter can be accepted. The first username will be "U0001" if the counter doesn't exist already.
 
-.The C<ignore_case> parameter forces the username and password to lower case in the database, in effect rendering the username and password case-insensitive.
+.If C<assign_username> is used, you can choose to have a pseudo-username that
+is different from the real username. (Email address is commonly used.) The
+field name is contained in the C<indirect_login> parameter. When the user
+logs in this field name will also be used to find the real username. The
+value must be unique in the database or a "user already exists" error will
+be thrown.
+
+.The C<ignore_case> parameter forces the username and password to lower case in the database, in effect rendering the username and password case-insensitive. This is
+recommended if using email address as a login.
 
 .If C<username_mask> is set to a valid Perl regular expression (without the surrounding / /), then any username containing a matching string will not be allowed for use. For example, to screen out order numbers from being used by a random user:
 
@@ -3198,13 +3220,13 @@
 a separate table named "billing", you would do:
 
 !block example
-	UserDB  outboard  <<EOF
-	    b_fname=billing::first_name,
-	    b_lname=billing::last_name,
-	    b_address1=billing::address1,
-	    b_address2=billing::address2,
-		b_etc=billing::etc
-	EOF
+        UserDB  outboard  <<EOF
+            b_fname=billing::first_name,
+            b_lname=billing::last_name,
+            b_address1=billing::address1,
+            b_address2=billing::address2,
+                b_etc=billing::etc
+        EOF
 !endblock
 
 When the user logs in, Interchange will access the C<first_name> field in
@@ -3216,11 +3238,11 @@
 
 !block example
  [calc]
-	my @s_fields = grep /\S/, split /[\s,\0]+/, $Config->{UserDB}{scratch};
-	for(@s_fields) {
-		$Values->{$_} = $Scratch->{$_};
-	}
-	return;
+        my @s_fields = grep /\S/, split /[\s,\0]+/, $Config->{UserDB}{scratch};
+        for(@s_fields) {
+                $Values->{$_} = $Scratch->{$_};
+        }
+        return;
  [/calc]
 !endblock
 
@@ -3228,7 +3250,7 @@
 can specify the column in the userdb that contains the key value:
 
 !block example
-	UserDB  default  outboard_key_col   account_id
+        UserDB  default  outboard_key_col   account_id
 !endblock
 
 H1: Tracking and Back-End Order Entry