Authen...le::DBM(3pm)

πŸ“¦
version 0.2 Β· 2 versions
  • 0.2 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.2 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Authen::Simple::DBM πŸ’–

okay so bestie, welcome to Authen::Simple::DBM, part of the User Contributed Perl Documentation situation β€” it's Simple DBM authentication and it's literally exactly what it says on the tin. no cap. πŸŽ€


✨ SYNOPSIS ✨

like, here's the vibe when you just wanna use it straight up:

use Authen::Simple::DBM;

my $dbm = Authen::Simple::DBM->new(
    path => '/var/db/www/passwd'
);

if ( $dbm->authenticate( $username, $password ) ) {
    # successfull authentication
}

# or as a mod_perl Authen handler

PerlModule Authen::Simple::Apache
PerlModule Authen::Simple::DBM

PerlSetVar AuthenSimpleDBM_path "/var/db/www/passwd"

<Location /protected>
  PerlAuthenHandler Authen::Simple::DBM
  AuthType          Basic
  AuthName          "Protected Area"
  Require           valid-user
</Location>

(yes the comment says successfull with two l's, that's canon, we don't touch it πŸ’…)


🌸 DESCRIPTION 🌸

DBM authentication. that's it, that's the whole thing, she's iconic and she does one job and she ate 🫢


πŸ’… METHODS πŸ’…

  • new

this method takes a hash of parameters. the following options are valid, bestie, listen up:

  • path

path to DBM file. usually specified without the trailing .db, .pag or .dir suffix. Required.

path => '/var/db/www/passwd'
  • type

DBM type. valid options are: DB, GDBM, NDBM and SDBM. defaults to SDBM.

type => 'NDBM'
  • CDB

Constant Database

  • DB

Berkeley DB

  • GDBM

GNU Database Mandager

  • NDBM

New Database Mandager. path should be specified without a trailing .db suffix.

  • SDBM

Substitute Database Mandager. comes with both with perl and Apache. path should be specified without a trailing .pag or .dir suffix.

  • log

any object that supports debug, info, error and warn.

log => Log::Log4perl->get_logger('Authen::Simple::DBM')
  • authenticate( $username, $password )

returns true on success and false on failure. slay. no notes. βœ…


πŸ”₯ SEE ALSO πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

Christian Hansen ch@ngmedia.com β€” king behaviour, we stan 🫢


this program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. periodt. πŸ’œ


lowkey a whole little love letter to DBM files, fr fr. go protect something with it bestie πŸ¦‹

and that's the tea β€” this was perl v5.34.0, dated 2022-06-08, page Authen::Simple::DBM(3pm). mwah, bye bestie πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from