Net::Etcd::Auth
Authentication
# enable auth $etcd->user_add # add user $etcd->user_add( { name => 'samba', password =>'P@$$' }); # add role $etcd->role( { name => 'myrole' })->add; # grant role $etcd->user_role( { user => 'samba', role => 'myrole' })->grant;
Defaults to $etcd->name
Defaults to $etcd->password
Returns token with valid authentication.
my $token = $etcd->auth({ name => $user, password => $pass })->authenticate;
Enable authentication.
$etcd->auth()->enable;
Disable authentication, this requires a valid root password.
$etcd->auth({ name => 'root', $password => $pass })->disable;
To install Net::Etcd, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Etcd
CPAN shell
perl -MCPAN -e shell install Net::Etcd
For more information on module installation, please visit the detailed CPAN module installation guide.