:NonMoose 0.20;
use CouchDB::Client 0.09 qw ();
use Catalyst::Exception;
use Catalyst::Utils;
use JSON 2.17 qw ();
use Try::Tiny 0.09;
use namespace::autoclean;
extends 'Catalyst::Authentication::Us
for_session {
my ($self) = @_;
my $data = $self->_user->contentForSubmit();
# Return JSON here, because it's fast, it's human readable so we can
# see what's going on in the session.
is mangling it.
return JSON::encode_json($data);
}
sub from_session {
my ($self, $frozen_user) = @_;
$self->_user($self->_user_doc_from_hash(JSON::decode_json($frozen_user)));
retur