NAME
WWW::Suffit::AuthDB::Realm - WWW::Suffit::AuthDB realm class
SYNOPSIS
use WWW::Suffit::AuthDB::Realm;
DESCRIPTION
This module provides AuthDB realm methods
ATTRIBUTES
This class implements the following attributes
cached
$realm = $realm->cached( 12345.123456789 );
my $cached = $realm->cached;
Sets or returns time of caching realm data
Default: 0
cachekey
$realm = $realm->cachekey( 'abcdef1234567890' );
my $cachekey = $realm->cachekey;
Sets or returns the cache key string
description
$realm->description('Root page');
my $description = $realm->description;
Sets and returns description of the realm
error
$realm = $realm->error( 'Oops' );
my $error = $realm->error;
Sets or returns error string
expires
$realm = $realm->expires( 300 );
my $expires = $realm->expires;
Sets or returns cache/object expiration time in seconds
Default: 300 (5 min)
id
$realm = $realm->id( 2 );
my $id = $realm->id;
Sets or returns id of realm
Default: 0
is_cached
This attribute returns true if the realm data was cached
Default: false
realm
$realm->realm('string');
my $real_string = $realm->realm;
Sets and returns realm string of the realm object
realmname
$realm->realmname('root');
my $realmname = $realm->realmname;
Sets and returns realmname of the realm object
requirements
$realm->requirements(['@alice', '%wheel']);
my $requirements = $relam->requirements; # ['@alice', '%wheel']
Sets and returns groups and users of realm (array of users and groups)
Note! Usernames should be prefixed with "@", group names should be prefixed with "%"
requires_users
my $reqs = $relam->requires; # [ {user => 'alice'}, { group => 'wheel'} ]
Returns list of requiremets (as array ref) that allows access to specified realm
satisfy
$realm->satisfy('Any');
my $satisfy = $realm->satisfy;
Sets and returns the satisfy policy (All, Any) of the realm object
METHODS
This class inherits all methods from Mojo::Base and implements the following new ones
is_valid
$realm->is_valid or die "Incorrect realm";
Returns boolean status of realm's data
mark
Marks object as cached
HISTORY
See Changes
file
TO DO
See TODO
file
SEE ALSO
WWW::Suffit::AuthDB, Mojolicious
AUTHOR
Serż Minus (Sergey Lepenkov) https://www.serzik.com <abalama@cpan.org>
COPYRIGHT
Copyright (C) 1998-2025 D&D Corporation. All Rights Reserved
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See LICENSE
file and https://dev.perl.org/licenses/