Reputation: 2099
By default Mojolicious sessions create a signed cookie for the session. I would like to override this behavior. I can extend Mojolicious::Sessions and override the load and store methods, but how do I use my class instead of the default Mojolicious::Sessions.
Upvotes: 1
Views: 375
Reputation: 20280
As documented, the Mojolicious::Sessions object is held in the app's sessions
property. Therefore you can either override it on creation
my $app = MyApp->new( sessions => MySessions->new );
or afterward
$app->sessions( MySessions->new );
Upvotes: 5