App::Authorization - A service that is used by various application components to know what the current user is authorized to do
use App; $context = App->context(); $auth = $context->service("Authorization"); # or ... $auth = $context->authorization();
An Authorization service is a means by which by various application components to know what the current user is authorized to do.
The following classes might be a part of the Authorization Class Group.
Class: App::Authorization
Class: App::Authorization::SharedDatastore
An Authorization service ...
* Throws: App::Exception::Authorization * Since: 0.01
...
The constructor is inherited from App::Service.
App::Service
* Signature: $auth->is_authorized($key); * Signature: $auth->is_authorized($key, $user); * Signature: $auth->is_authorized($key, $user, $options); * Signature: $auth->is_authorized($key, undef, $options); * Param: $key string * Param: $user string * Param: $options HASH * Return: $is_auth boolean * Throws: App::Exception::Authorization * Since: 0.01 Sample Usage: $context = App->context(); $auth = $context->service("Authorization"); # or ... $auth = $context->authorization(); if ($auth->is_authorized("/main/data/edit")) { # ... }
Returns 'Authorization';
* Signature: $service_type = App::Authorization->service_type(); * Param: void * Return: $service_type string * Since: 0.01 $service_type = $auth->service_type();
* Author: Stephen Adkins <spadkins@gmail.com> * License: This is free software. It is licensed under the same terms as Perl itself.
App::Context, App::Service
App::Context
To install App::Context, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Context
CPAN shell
perl -MCPAN -e shell install App::Context
For more information on module installation, please visit the detailed CPAN module installation guide.