Basho\Riak\Node\Config::setAuth PHP Method

setAuth() public method

public setAuth ( boolean $auth )
$auth boolean
    public function setAuth($auth)
    {
        $this->auth = $auth;
    }

Usage Example

Example #1
0
 /**
  * usingPamAuthentication
  *
  * Build nodes with PAM authentication
  *
  * User authentication and access rules are only available in Riak versions 2 and above. To use this feature, TSL
  * is required to communicate with your Riak nodes.
  *
  * @param $user
  *
  * @return $this
  */
 public function usingPamAuthentication($user)
 {
     $this->config->setUser($user);
     $this->config->setAuth(true);
     return $this;
 }