comparison Lib/IMPL/Web/Application/Action.pm @ 52:15d720913562

security in work
author wizard@linux-odin.local
date Tue, 02 Mar 2010 20:12:02 +0300 (2010-03-02)
parents
children 609b59c9f03c
comparison
equal deleted inserted replaced
51:a1498298d3ee 52:15d720913562
1 package IMPL::Web::Application::Action;
2
3 use base qw(IMPL::Object);
4
5 use IMPL::Class::Property;
6
7 BEGIN {
8 public property application => prop_get | owner_set;
9 public property request => prop_get | owner_set;
10 public property response => prop_get | owner_set;
11 public property code => prop_get | owner_set;
12 public property chainHandlers => prop_get | owner_set | prop_list;
13 }
14
15 1;
16
17 __END__
18
19 =pod
20
21 =head1 DESCRIPTION
22
23 ���������� ������� ���������� �������, ����������� ���������, �������������� ��������.
24
25 ������ ��������� ������������ ��������, ����� ��� C<IMPL::Web::Application::UriController>.
26 ��� ���� ����������� ������� ������������ �������, ��� ������� ����� ����������� � ���������� ������������,
27 ������ ������ ����������� ���������� � �������� ������ �� ���������� �������� �� ������ ������� ������,
28 �� � ���������� ����������.
29
30 �������� ������� ����� ���� �����, � ������� ����������
31
32 $objSecCallToMethod($target,$method)
33 $AuthenticateMethod
34 $TDocumentOut($file)
35
36 ��� �������� � ��������� ������������������
37
38 Action->Invoke() {
39 TDocumentOut->Invoke($Action,$nextHandler) {
40 my $result = $nextHandler() {
41 $AuthenticateMethod($Action,$nextHandler) {
42 my $context = $Action->application->security->Authenticate($Action->request,$Action->response);
43 return $context->Impersonate($nextHandler) {
44 $objSecCallToMethod->Invoke($Action,undef) {
45 IMPL::Security->AccessCheck($target,$method);
46 return $target->$method();
47 }
48 }
49 }
50 }
51 $this->format($result,$Action->response->streamBody);
52 }
53 }
54
55 ��� ��� ������������ ����� ���� ���
56
57 $objSecCallToMethod($target,$method)
58 $AuthenticateMethod
59 $TransfromToSimpleData
60 $JSONOut
61
62 � ������ ������� ����� ���������� ����� ������, �� ��� ��������� ����� �������������
63 � ������� ��������� � ���������� JSON ���������������. ����� ������� ������ ������
64 �� ��������� ����� � �������� �������, ��� ������ ��������� �������������� �������.
65
66 =cut