1 package Text::Tradition::UserStore;
7 use KiokuX::User::Util qw(crypt_password);
9 use Text::Tradition::User;
10 use Text::Tradition::Directory;
12 has 'directory' => ( is => 'rw', isa => 'KiokuX::Model');
15 my ($self, $username, $password) = @_;
17 my $user = Text::Tradition::User->new(
19 password => crypt_password($password),
22 my $scope = $self->directory->new_scope;
23 $self->directory->store($user->kiokudb_object_id, $user);
29 my ($self, $username) = @_;
31 return $self->directory->lookup($self->user_prefix . $username);