Code Monkey home page Code Monkey logo

magento_crossareasessions's People

Contributors

aschrammel avatar astorm avatar francosabolo avatar rcurrington avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

magento_crossareasessions's Issues

I can't seem to pull the active session

I can't seem to find out what is going on - every time I load session data with getSessionData, it does not include a "user" element under the "admin" array.

It seems to be loading an empty session, rather than the one that is live in my browser.

Any ideas?

require_once ('../app/Mage.php');
Mage::app(); 

// Ensure we're in the admin session namespace for checking the admin user..
Mage::getSingleton('core/session', array('name' => 'adminhtml'));

$adminhtml  = Mage::getModel('pulsestorm_crossareasession/manager')
->getSessionData('adminhtml'); 

var_export($adminhtml);

Output is:
array ( 'core' => array ( '_session_validator_data' => array ( 'remote_addr' => '[[ip]]', 'http_via' => '', 'http_x_forwarded_for' => '', 'http_user_agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.85 Safari/537.36', ), 'session_hosts' => array ( 'mydomain.com' => true, ), ), 'admin' => array ( '_session_validator_data' => array ( 'remote_addr' => '[[ip]]', 'http_via' => '', 'http_x_forwarded_for' => '', 'http_user_agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.85 Safari/537.36', ), 'session_hosts' => array ( 'mydomain.com' => true, ), ), )

The output is the same regardless of whether I have an admin session running or not.

Thanks in advance!

Investigate HTTP/HTTPS solutions

A cookie set during a secure request won't be sent to the server during a non-secure request.

Investigate ways to ensure Cross Area Session always works (stash session IDs somewhere, "super session" id, etc.)

Add support for Redis

Redis is (likely) the next most popular session storage engine. The project should support it.

Also, I believe this will require adding a User.php class to the loader folder — if this is the caste User.php should also have a factory pattern applied so that multiple user level storage solutions (redit, memcache, etc.) are supportable.

Some Sort of Test Harness

Finding a way to wrap all this is a test harness would be useful — but sessions session behavior on the command line is weird so I'm not sure the best way to go about this.

Magento 2 Version

Hi

Need Magento 2 Version of this module. I tried copying session file from vendor/magento/module-customer/Model/Session.php and changed the $this->_eventManager->dispatch('new_session_init', ['new_session' => $this]);

But its not working.
Do i need to initialize it before any preDispatch/Any Event?

Thank you
Sasikiran Kesavan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.