---
name: "Catalyst::Plugin::Authentication::Store::Minimal::Backend"
section: "3pm"
platform: "linux"
package: "libcatalyst-modules-perl"
version: "14"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/Catalyst::Plugin::Authentication::Store::Minimal::Backend"
---

# Catalyst::Plugin::Authentication::Store::Minimal::Backend(3pm)

Minimal authentication storage backend.

## NAME

Catalyst::Plugin::Authentication::Store::Minimal::Backend - Minimal authentication storage backend.

## SYNOPSIS

```
    # you probably just want Store::Minimal under most cases,
    # but if you insist you can instantiate your own store:
```

```
    use Catalyst::Plugin::Authentication::Store::Minimal::Backend;
```

```
    use Catalyst qw/
        Authentication
        Authentication::Credential::Password
    /;
```

```
    my %users = (
        user => { password => "s3cr3t" },
    );
```

```
    our $users = Catalyst::Plugin::Authentication::Store::Minimal::Backend->new(\%users);
```

```
    sub action : Local {
        my ( $self, $c ) = @_;
```

```
        $c->login( $users->get_user( $c->req->param("login") ),
            $c->req->param("password") );
    }
```

## DESCRIPTION

You probably want Catalyst::Plugin::Authentication::Store::Minimal, unless you are mixing several stores in a single app and one of them is Minimal.

Otherwise, this lets you create a store manually.

## METHODS

- new $hash\_ref

  Constructs a new store object, which uses the supplied hash ref as it's backing structure.

- get\_user $id

  Keys the hash by `$id` and returns the value.

  If the return value is unblessed it will be blessed as Catalyst::Plugin::Authentication::User::Hash.

- from\_session $id

  Delegates to `"get_user"`.

- user\_supports

  Chooses a random user from the hash and delegates to it.
