diff Lib/IMPL/Web/Application.pm @ 357:ec58c47edb52

web security: code cleanup, refactoring
author cin
date Fri, 18 Oct 2013 15:10:10 +0400
parents 97628101b765
children
line wrap: on
line diff
--- a/Lib/IMPL/Web/Application.pm	Thu Oct 17 17:48:50 2013 +0400
+++ b/Lib/IMPL/Web/Application.pm	Fri Oct 18 15:10:10 2013 +0400
@@ -25,7 +25,7 @@
 	    baseUrl            => PROP_RW,
 		actionFactory      => PROP_RW,
 		handlers           => PROP_RW | PROP_LIST,
-		security           => PROP_RW,
+		securityFactory    => PROP_RW,
 		output             => PROP_RW,
 		location           => PROP_RO,
 		_handler           => PROP_RW
@@ -45,6 +45,11 @@
 	$this->location(Locator->new(base => $this->baseUrl));
 }
 
+sub CreateSecurity {
+	my $factory = shift->securityFactory;
+	return $factory ? $factory->new() : undef;
+}
+
 sub ProcessRequest {
     my ($this,$q) = @_;