=head2 sourcefile
sourcefile => '/tmp/authdb.json'
Path to the source file in JSON format
$authdb = $authdb->sourcefile("/tmp/authdb.json");
my $sourcefile = $authdb->sourcefile;
Defa
ds => "sqlite:///tmp/auth.db?sqlite_unicode=1",
sourcefile => "/tmp/authdb.json"
);
die $authdb->error if $authdb->error;
Create new AuthDB object
=head2 cache
tion with database. See also L</cached> attribute
=head2 dump
print $authdb->dump;
Returns JSON dump of loaded authentication database
=head2 group
my $group = $authdb->group("manager");
$authdb->export_data->save; # to `sourcefile`
$authdb->export_data("/tmp/authdb.json");
Export all data to JSON file
=head2 group_del
$authdb->group_del( "wheel" ) or die $authdb->error;
D
ort_data; # from `sourcefile` preloaded data
$authdb->import_data("/tmp/authdb.json");
Import all data from JSON file
=head2 meta
$authdb->meta("my.key", "my value") or die $authdb->error;
DEFAULT NULL, -- Private Key (RSA/X509)
"attributes" TEXT DEFAULT NULL, -- Attributes (JSON)
"comment" TEXT DEFAULT NULL -- Comment
);
CREATE TABLE IF NOT EXISTS "grou
DEFAULT NULL, -- Private Key (RSA/X509)
`attributes` TEXT DEFAULT NULL, -- Attributes (JSON)
`comment` TEXT DEFAULT NULL, -- Comment
PRIMARY KEY (`id`),
UNIQUE
EXT DEFAULT NULL, -- Private Key (RSA/X509)
"attributes" TEXT DEFAULT NULL, -- Attributes (JSON)
"comment" TEXT DEFAULT NULL -- Comment
) ;
CREATE TABLE IF NOT EXISTS "groups" (
"
024*1024 (1`048`576 keys max)
=head2 sourcefile
sourcefile => '/tmp/authdb.json'
Path to the source file in JSON format
See L<WWW::Suffit::AuthDB/sourcefile>
Default: none
=head1 HELPERS
Th
);
my $attributes = $user->attributes;
Sets or returns additional attributes of the user in JSON format
Default: none
=head2 cached
$user = $user->cached( 12345.123456789 );
my $cache