WWW-Suffit-AuthDB
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/WWW/Suffit/AuthDB.pm view on Meta::CPAN
email => $email,
name => $name,
role => $role,
) or вÑÑ($authdb->error);
Edit general user data
=head2 user_get
my %data = $authdb->user_get( "admin" );
my @users = $authdb->user_get;
This method returns user's data or returns all users as array of hashes
=head2 user_groups
my @groups = $authdb->user_groups( "admin" );
This method returns all groups of the user
=head2 user_passwd
$authdb->user_passwd(
username => "admin",
password => "password",
) or die $authdb->error;
This method sets password for user
=head2 user_pure_set
$authdb->user_pure_set(
username => "admin",
name => "Test User",
# . . .
) or die $authdb->error;
This method adds new user or doing update data of existing user in pure mode
=head2 user_search
my @users = $authdb->user_search( $text );
This method performs search user by name fragment
=head2 user_set
$authdb->user_set(
username => "admin",
name => "Test User",
# . . .
) or die $authdb->error;
This method adds new user or doing update data of existing user
=head2 user_setkeys
$authdb->user_setkeys(
username => "admin",
public_key => $public_key,
private_key => $private_key,
) or die $authdb->error;
This method sets keys for user
=head2 user_tokens
my @tokens = $authdb->user_tokens( $username );
This method returns all tokens of specified user
=head1 EXAMPLE
Example of default authdb.json
See C<src/authdb.json>
=head1 HISTORY
See C<Changes> file
=head1 TO DO
See C<TODO> file
=head1 SEE ALSO
L<WWW::Suffit>, L<Mojolicious>
=head1 AUTHOR
Serż Minus (Sergey Lepenkov) L<https://www.serzik.com> E<lt>abalama@cpan.orgE<gt>
=head1 COPYRIGHT
Copyright (C) 1998-2023 D&D Corporation. All Rights Reserved
=head1 LICENSE
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
See C<LICENSE> file and L<https://dev.perl.org/licenses/>
=cut
our $VERSION = '1.00';
use Carp; # $Carp::Verbose = 1;
use Mojo::Base -base;
use Mojo::Util qw/md5_sum decode encode secure_compare/;
use Mojo::File qw/path/;
use Mojo::JSON qw/from_json to_json/;
use Mojo::Cache;
use Mojo::URL;
use Mojolicious::Routes::Pattern;
use Digest::SHA qw/sha1_hex sha224_hex sha256_hex sha384_hex sha512_hex/;
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.671 second using v1.00-cache-2.02-grep-82fe00e-cpan-2cc899e4a130 )