diff Lib/IMPL/Web/Handler/SecureCookie.pm @ 328:63709a4e6da0

Security framework refactoring
author cin
date Mon, 03 Jun 2013 03:28:01 +0400
parents 0f59b2de72af
children 97628101b765
line wrap: on
line diff
--- a/Lib/IMPL/Web/Handler/SecureCookie.pm	Thu May 30 20:31:37 2013 +0400
+++ b/Lib/IMPL/Web/Handler/SecureCookie.pm	Mon Jun 03 03:28:01 2013 +0400
@@ -65,8 +65,8 @@
     my $sign = $action->cookie('sign',qw/(\w+)/);
     
     if ( $this->ValidateCookie($sid,$cookie,$sign) ) {
-        # TODO: add a DefferedProxy to deffer a request to a data source
-        if ( $context = $this->_manager->GetSession($sid) ) {
+        # TODO: add a DeferredProxy to deffer a request to a data source
+        if ( $context = $this->_manager->sessions->GetById($sid) ) {
             if ( eval { $context->auth->isa(AuthSimple) } ) {
                 my ($result,$challenge) = $context->auth->DoAuth($cookie);
  
@@ -115,13 +115,13 @@
 	        sdata => $cookie
 	    });
 	    
-	    my $context = $this->_manager->CreateSession(
+	    my $context = $this->_manager->sessions->Create({
 	        sessionId => $sid,
 	        principal => $user,
 	        auth => AuthSimple->Create(password => $cookie),
 	        authority => $this,
 	        rolesAssigned => $roles
-	    );
+	    });
 	    
 	    $context->Apply();