NAME

Mojolicious::Plugin::Credentials - A credentials store in mojo

VERSION

version 0.003

SYNOPSIS

# Mojolicious::Lite

plugin 'Credentials';

# Mojolicious

sub startup {
  my $self = shift;

  $self->plugin('Credentials');
}

DESCRIPTION

This module plugs Crypt::Credentials into your Mojolicious application. This allows you to store credentials using only one key.

Credentials can by edited using the credentials mojo command (e.g. ./myapp.pl credentials edit google.

CONFIGURATION

It takes two arguments, both optional.

  • keys

    This is the key used to encrypt the credentials. If not given this will use the environmental variable MOJO_CREDENTIALS_KEYS (split on colons), and otherwise it will bail out. In both cases the key will be expected in hexadecimal form.

  • dir

    This is the directory of the credentials. If not given it will default to $MOJO_HOME/credentials, or if MOJO_HOME isn't defined ./credentials.

HELPERS

credentials

This will return the appropriately configured Crypt::Credentials object.

my ($username, $password) = credentials->get_yaml('google')->@{'username', 'password'};

AUTHOR

Leon Timmermans <fawaka@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2024 by Leon Timmermans.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.