annotate Lib/IMPL/Web/Security.pm @ 78:a5cb84374d40

TT::Control in work
author wizard
date Fri, 02 Apr 2010 20:19:17 +0400
parents 2f31ecabe9ea
children 2d1c3f713280
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
52
15d720913562 security in work
wizard@linux-odin.local
parents:
diff changeset
1 package IMPL::Web::Security;
15d720913562 security in work
wizard@linux-odin.local
parents:
diff changeset
2
73
wizard
parents: 66
diff changeset
3 use base qw(IMPL::Object IMPL::Security IMPL::Object::Autofill);
wizard
parents: 66
diff changeset
4
wizard
parents: 66
diff changeset
5 use IMPL::Class::Property;
wizard
parents: 66
diff changeset
6
wizard
parents: 66
diff changeset
7 __PACKAGE__->PassThroughArgs;
wizard
parents: 66
diff changeset
8
wizard
parents: 66
diff changeset
9 BEGIN {
wizard
parents: 66
diff changeset
10 public property sessionFactory => prop_get | owner_set;
wizard
parents: 66
diff changeset
11 public property userFactory => prop_get | owner_set;
wizard
parents: 66
diff changeset
12 }
wizard
parents: 66
diff changeset
13
wizard
parents: 66
diff changeset
14 sub CTOR {
wizard
parents: 66
diff changeset
15 my ($this) = @_;
wizard
parents: 66
diff changeset
16
wizard
parents: 66
diff changeset
17 $this->dataSource or die new IMPL::InvalidArgumentException("The argument is required",'dataSource');
wizard
parents: 66
diff changeset
18 }
wizard
parents: 66
diff changeset
19
wizard
parents: 66
diff changeset
20 sub Session {
wizard
parents: 66
diff changeset
21 my ($this,%args) = @_;
wizard
parents: 66
diff changeset
22 }
wizard
parents: 66
diff changeset
23
wizard
parents: 66
diff changeset
24 sub User {
wizard
parents: 66
diff changeset
25
wizard
parents: 66
diff changeset
26 }
wizard
parents: 66
diff changeset
27
52
15d720913562 security in work
wizard@linux-odin.local
parents:
diff changeset
28 1;
15d720913562 security in work
wizard@linux-odin.local
parents:
diff changeset
29
15d720913562 security in work
wizard@linux-odin.local
parents:
diff changeset
30 __END__
15d720913562 security in work
wizard@linux-odin.local
parents:
diff changeset
31
15d720913562 security in work
wizard@linux-odin.local
parents:
diff changeset
32 =pod
15d720913562 security in work
wizard@linux-odin.local
parents:
diff changeset
33
73
wizard
parents: 66
diff changeset
34 =head1 NAME
wizard
parents: 66
diff changeset
35
wizard
parents: 66
diff changeset
36 C<IMPL::Web::Security> Модуль для аутентификации и авторизации веб запроса.
wizard
parents: 66
diff changeset
37
wizard
parents: 66
diff changeset
38 =head1 SINOPSYS
wizard
parents: 66
diff changeset
39
wizard
parents: 66
diff changeset
40 =begin code xml
wizard
parents: 66
diff changeset
41
wizard
parents: 66
diff changeset
42 <security type='IMPL::Config::Activator'>
wizard
parents: 66
diff changeset
43 <factory>IMPL::Web::Security</factory>
wizard
parents: 66
diff changeset
44 <parameters type='HASH'>
wizard
parents: 66
diff changeset
45 <sessionFactory type='IMPL::Object::Factory'>
wizard
parents: 66
diff changeset
46 <factory type='IMPL::Object::Factory'>App::Data::Session</factory>
wizard
parents: 66
diff changeset
47 <method>insert</method>
wizard
parents: 66
diff changeset
48 </sessionFactory>
wizard
parents: 66
diff changeset
49 </parameters>
wizard
parents: 66
diff changeset
50 </security>
wizard
parents: 66
diff changeset
51
wizard
parents: 66
diff changeset
52 =end code xml
wizard
parents: 66
diff changeset
53
52
15d720913562 security in work
wizard@linux-odin.local
parents:
diff changeset
54 =head1 DESCRIPTION
15d720913562 security in work
wizard@linux-odin.local
parents:
diff changeset
55
73
wizard
parents: 66
diff changeset
56 Отвечает за инфраструктуру аутентификации и авторизации запросов. Основная особенность
wizard
parents: 66
diff changeset
57 заключается в том, что запросы приходят через значительные интевалы времени, хотя и
wizard
parents: 66
diff changeset
58 относятся к одной логической транзакции. В промежутках между запросами сервер не
wizard
parents: 66
diff changeset
59 сохраняет свое состояние. Поэтому при каждом обращении сервер восстанавливает
wizard
parents: 66
diff changeset
60 контекст безопасности.
52
15d720913562 security in work
wizard@linux-odin.local
parents:
diff changeset
61
73
wizard
parents: 66
diff changeset
62 C<IMPL::Web::Session> Объект обеспечивающий сохранение состояния в рамках одной сессии
wizard
parents: 66
diff changeset
63 пользователя. Кроме контекста безопасности хранит дополнительние данные, которые необходимо
wizard
parents: 66
diff changeset
64 сохранить между обработкой запросов.
52
15d720913562 security in work
wizard@linux-odin.local
parents:
diff changeset
65
73
wizard
parents: 66
diff changeset
66 C<IMPL::Web::User> Объект, устанавливающий связь между идентификатором пользователя
wizard
parents: 66
diff changeset
67 C<IMPL::Security::Principal>, его ролями и данными безопасности для создания объектов
wizard
parents: 66
diff changeset
68 аутентификации C<IMPL::Security::Auth>.
52
15d720913562 security in work
wizard@linux-odin.local
parents:
diff changeset
69
73
wizard
parents: 66
diff changeset
70 =head1 MEMBERS
52
15d720913562 security in work
wizard@linux-odin.local
parents:
diff changeset
71
15d720913562 security in work
wizard@linux-odin.local
parents:
diff changeset
72 =cut