Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/librecat/dancer-plugin-auth-rbac-credentials-catmandu
Catmandu store backend for Dancer::Plugin::RBAC::Credentials
https://github.com/librecat/dancer-plugin-auth-rbac-credentials-catmandu
Last synced: 4 days ago
JSON representation
Catmandu store backend for Dancer::Plugin::RBAC::Credentials
- Host: GitHub
- URL: https://github.com/librecat/dancer-plugin-auth-rbac-credentials-catmandu
- Owner: LibreCat
- License: other
- Created: 2013-03-18T15:20:06.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-21T09:28:34.000Z (about 10 years ago)
- Last Synced: 2024-05-09T11:37:05.640Z (6 months ago)
- Language: Perl
- Size: 145 KB
- Stars: 0
- Watchers: 11
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
# NAME
Dancer::Plugin::Auth::RBAC::Credentials::Catmandu - Catmandu store backend for Dancer::Plugin::RBAC::Credentials
# INSTALLATION AND CONFIGURATION
## install the following perl modules
- Catmandu
- Catmandu::DBI## add the yaml file 'catmandu.yml' to the root directory of your Dancer project
store:
default:
package: Catmandu::Store::DBI
options:
data\_source: "dbi:mysql:database=myapp"
username: "admin"
password: "admin"## adjust your Dancer config.yml
plugins:
Auth::RBAC:
credentials:
class: Catmandu
options:
#name of store in catmandu.yml
store: 'default'
#name of table
bag: 'users'## The table 'users' will be created if not exists already, and will have the following format
- id
identifier of the user
- data
json data, in the following form:
{
_id: "njfranck",
login: "njfranck",
name: "Nicolas Franck",
password: "password",
roles: ["admin"]}
## in order to add users execute the following code
Catmandu->store('default')->bag('users')->add({
\_id => "user2",
name => "user 2",
login => "user2",
password => "secret",
roles => \["editor","messenger"\]});
# NOTE
The configuration of the store is only a sample. Different other stores exist in Catmandu.
See:[Catmandu::Store::Hash](https://metacpan.org/pod/Catmandu::Store::Hash)
[Catmandu::Store::Solr](https://metacpan.org/pod/Catmandu::Store::Solr)
[Catmandu::Store::MongoDB](https://metacpan.org/pod/Catmandu::Store::MongoDB)
# AUTHOR
Nicolas Franck, ``
# SEE ALSO
[Catmandu](https://metacpan.org/pod/Catmandu)
[Catmandu::Store::DBI](https://metacpan.org/pod/Catmandu::Store::DBI)
[Dancer::Plugin::Auth::RBAC](https://metacpan.org/pod/Dancer::Plugin::Auth::RBAC)
# LICENSE AND COPYRIGHT
This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.See http://dev.perl.org/licenses/ for more information.