The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

PlugAuth::Plugin::FlatAuth - Authentication using Flat Files for PlugAuth

VERSION

version 0.39

SYNOPSIS

In your PlugAuth.conf file:

 ---
 url: http://localhost:1234
 user_file: /path/to/user.txt

Touch the user file:

 % touch /path/to/user.txt

Add users using htpasswd (comes with Apache):

 % htpasswd -m /path/to/user.txt newusername
 New password: 
 Re-type new password: 

Start PlugAuth:

 % plugauth start

DESCRIPTION

This is the default Authentication plugin for PlugAuth. It is designed to work closely with PlugAuth::Plugin::FlatAuthz which is the default Authorization plugin.

This plugin provides storage and password verification for users. This plugin also provides a mechanism for PlugAuth to change passwords, create and delete users. Although the user information is stored in flat files, the entire user database is kept in memory and the files are only re-read when a change is detected, so this plugin is relatively fast.

CONFIGURATION

user_file

The user file is specified in the PlugAuth.conf file using the user_file field. The format of the user is a basic user:password comma separated list, which is compatible with Apache password files. Either the UNIX crypt, Apache MD5 or UNIX MD5 format may be used for the passwords.

 foo:$apr1$F3VOmjio$O8dodh0VEljQvuzeruvsb0
 bar:yOJEfNAE.gppk

It is possible to have multiple user files if you specify a list:

 ---
 user_file:
   - /path/to/user1.txt
   - /path/to/user2.txt

METHODS

PlugAuth::Plugin::FlatAuth->refresh

Refresh the data (checks the files, and re-reads if necessary).

PlugAuth::Plugin::FlatAuth->check_credentials( $user, $password )

Given a user and password, check to see if the password is correct.

PlugAuth::Plugin::FlatAuth->all_users

Returns a list of all users.

PlugAuth::Plugin::FlatAuth->create_user( $user, $password )

PlugAuth::Plugin::FlatAuth->create_user_cb( $user, $password, $callback)

Create a new user with the given password.

PlugAuth::Plugin::FlatAuth->change_password( $user, $password )

Change the password of the given user.

PlugAuth::Plugin::FlatAuth->delete_user( $user )

Delete the given user.

SEE ALSO

PlugAuth, PlugAuth::Plugin::FlatAuthz

AUTHOR

Graham Ollis <gollis@sesda3.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by NASA GSFC.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.