NAME
Net::Etcd::Auth
DESCRIPTION
Authentication
SYNOPSIS
# 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;
endpoint
name
Defaults to $etcd->name
password
Defaults to $etcd->password
PUBLIC METHODS
authenticate
Returns token with valid authentication.
my $token = $etcd->auth({ name => $user, password => $pass })->authenticate;
enable
Enable authentication.
$etcd->auth()->enable;
disable
Disable authentication, this requires a valid root password.
$etcd->auth({ name => 'root', $password => $pass })->disable;